Antares Trader Blog

The universe at your fingertips

On the Nature of Time and Computation

Monday

May 10, 2010

5:00 am PDT

Part of the joy of being a hobby programmer is that I can afford to get sidetracked by all the cool things that "real world" hackers have to put on the back burner because there is paying work. (Not that I wouldn't take a paying gig mind you) One of those side tracks is language design, specifically as it relates to parallel computation. That why I was so interested in the video of Rich Hickey's talk from the JVM Language Summit:

Are We There Yet?. Rick Hickey. JVM Language Summit, Nov 12, 2009.

Read More edit delete

Mongoid vs MongoMapper

Monday

May 03, 2010

8:04 pm PDT

Filed Under:

Programming Zen

Lets start with the obvious: MongoDB (Ruby Driver) hits the sweet spot in the NoSQL field for web apps. It has more flexibility then a traditional RDMS and scales horizontally with relative ease, but it is also more user friendly then key/value stores which require you to implement by hand many of the features one might take for granted, like indexes and queries.

Having said this, there is still a need for an ORM layer if one wants to create the model layer efficiently. In this post I am going to relate my experience with the two most popular Mongoid by Durran Jordan and MongoMapper by John Nunemaker.

Read More edit delete

Set the Process Name

Saturday

Mar 27, 2010

6:35 pm PDT

Filed Under:

Fixed it

Just a quickie derived from my experience with Updater. It is blindingly simple to set the process name in ruby, just set $0 to the appropriate string. Dave Thomas does an excellent job of explaining why this might be an incredibly useful thing to do. You can then see this name in the list of processes from top, though I had to use the 'c' command, and ps -f.

I have rake tasks for updater, and with this I can get a much more useful output then 12 instance of rake.

edit delete

Released: Updater v0.9.0

Friday

Mar 26, 2010

2:59 pm PDT

Filed Under:

Progress Report

Updater is my background job queue processor. (GitHub Repository) It works a bit like delayed_job or rescue. While it is intended to work with a number of different ORM layers, at the moment only DataMapper is implemented. Native support for MongoDB and ActiveRecord are planed. Get it on GemCutter with gem install updater.

Read More edit delete

Clearing the Connection Pool in DataMapper

Tuesday

Mar 23, 2010

5:00 am PDT

Filed Under:

Fixed it

Programming Zen

This is one of those thing that I spent too long Googling for and wishing that someone else had written this post. For a number of different adapters, DataObject (the datastore abstraction layer of DataMapper) creates a pool of up to 8 connections to the database server. This pool is thread safe, but not safe across processes when using fork. In this case, one needs to empty the pool before forking. A chat an the IRC channel reviled that this also may be useful if you are getting too many connections. To empty all connection pools:

#!/ruby
DataObjects::Pooling.pools.each do {|pool| pool.dispose}

Read More edit delete

Repository Change

Monday

Mar 22, 2010

5:00 am PDT

Filed Under:

Fixed it

Progress Report

My GitHub repository has moved from startrader to antarestrader. please update your remotes if you have them pointed at the old repository. To do this edit you .git/config file and change the line that says startrader to antarestrader. eg:

[remote "github"]
    url = git://github.com/startrader/Updater.git
    fetch = +refs/heads/*:refs/remotes/github/*

becomes

[remote "github"]
    url = git://github.com/antarestrader/Updater.git
    fetch = +refs/heads/*:refs/remotes/github/*

edit delete

Updater Progress Report

Saturday

Mar 20, 2010

10:51 pm PDT

Filed Under:

Progress Report

Even though Holy Week is fast approaching and I will be tied up with real world work, I have still made quite a bit of progress on Updater. Everything else is taking a back seat at the moment because I need this library for everything else I want to do. There are just a few more things to do before I will put out a 1.0 release.

Read More edit delete

Socket In Brief, For Ruby

Friday

Mar 19, 2010

6:09 pm PDT

Filed Under:

Programming Zen

This post is mainly for my reference, but someone is else is going to be looking for this information. This post is about how to use the low lever socket layer of ruby. in particular it is about how to get to a point where one can read and write over the connection. It covers the three major types sockets: UNIX, UDP and TCP. Most of the information here can be extracted for this page.

Read More edit delete

Towards a Better Queue Processing Model

Wednesday

Mar 17, 2010

12:43 pm PDT

My current short-term area of interest is in background job queues such as Resque (Git Hub Repository), Delayed_job and my own contribution Updater. So when I ran across this article about dynamically assigning jobs to queues it got me thinking about why there is a need for different queues, and how jobs get organized. I realized that it is part of the problem I am trying to solve in Updater.

Read More edit delete

How to Make News Profitable Again

Sunday

Mar 14, 2010

8:25 pm PDT

Filed Under:

Design Ideas

This is a follow-up to this resent post.

Selling news is not at this point a profitable long term business. News organizations large and small are laying off staff, or closing, and I, for one, am saddened. The quality and diversity of news coverage has dropped. In the late '90s I was a college student at Cal Poly SLO. My work study job was at the current periodicals desk in the library where I worked the weekend shift. Any one want to guess what the volume of patrons was at 2:00pm Saturday afternoon? When I was not helping patrons, I read some of the 25 or so newspapers we subscribed to, along with a number of weekly and most of the articles in the science and physics journals.

The differences between then and now are that I cannot find a job that pays me to read for 12 hours a week, and even if I could there would be nothing worth reading. Daily newspapers are filled with the same dozen or so wire service articles, interspersed with reprints of press releases and highlights from police logs dressed up as real reporting. What I used to love about print publications, in-depth, local reporting is gone with the loss of ad review and with it the loss of readership.

In this post I want to look at why there is no market for news today, and some of the ways I think good reporting can start t generate profits again.

Read More edit delete

older posts