Monthly Archives: March 2009

Go Fetch

I’m a fan of the #fetch method in Ruby. I’ve noticed that other Rubyists don’t use it as much as I do, so I thought I’d write a little bit about why I like it so much. First of all, … Continue reading

Posted in Uncategorized | Tagged | 15 Comments

Writing Facades on Legacy Code

h2. The Setup Let’s say we have a system in production which manages college financial aid departments. Over the years it has accumulated a fairly complex object model for handling the many kinds of forms a financial aid department has … Continue reading

Posted in Uncategorized | Tagged , , , | 4 Comments

Smart Requires in Ruby

I have a lot of Ruby RSpec files that start out with a line something like this: require File.join(File.dirname(__FILE__), %w[.. spec_helper]) “This is boilerplate” thought I one day, “my editor should insert this line for me!” But there’s a problem: … Continue reading

Posted in Uncategorized | Tagged | 6 Comments