Arguments with Trollop
- 21Aug2009

Command line arguments can be a hassle to parse. Trollop makes them easier.

Database Paranoia — ActiveRecord Callbacks
- 20Aug2009

On a particular, nameless, heterogenous project using ruby on rails, ant, and shell scripts, there was an instance where data was not being properly cleaned before going into the database (primarily due to user errors in property files which were used by ant to feed the database).   As a result, the database was filled with […]

Ruby Bindings and Scope
- 19Aug2009

One of the features of Ruby’s Kernel module (which is imported into Object, so it’s available in every class) is the binding.  The binding allows you to keep a pointer to the scope at a particular location in your application and then later evaluate code from that location. For example (and this came up as […]

What’s #method_missing missing?
- 18Aug2009

#method_missing is a useful feature in ruby. However, there’s something that many people miss when using it.

After long silence
- 10Apr2009

The hiatus has been due to me having been really sick with a weird neurological disorder.  I didn’t do any coding at all for over 2 months.  I’m starting to feel better, but I still have my good days and bad.  So, there will be updates.  Hopefully before not too much longer.

Overriding operators: two dimensional arrays
- 23Feb2009

Image via Wikipedia One of the neat things about ruby is that, in general, operators are methods, so they can be overridden. When working with multidimensional arrays, some languages allow you to do the following: a[0,0] whereas ruby uses: a[0][0] Which makes sense, since Ruby implements it as an array of arrays and you’re chaining […]