Skip to content

Category Archives: general

Installing fuzzyfinder_textmate: Textmate’s Cmd+T in Vim

When Jamis Buck switched from TextMate to vim, he found he missed one bit of functionality above all others: TextMate’s file finder, Cmd+T.
Being a capable programmer, he “took an evening” and wrote up a Ruby library to replicate this functionality.  Then he extended vim with a plugin called fuzzyfinder_textmate that called out to this Ruby [...]

New In factory_girl: Callbacks

Thoughtbot’s factory_girl has recently gotten a terrific new feature: callbacks.
They look like this:

Factory(:user) do |u|
 
u.after_create { |user_instance| do_something_to(user_instance) }
 
end

Now, when you use Factory(:user) in your tests, the do_something_to method will be called after the user is saved in the database.  Also notice that you’ll be passed the instance of the user as block [...]

Making Github’s Code Readable

I love Github.  We recently decided to become paid customers at work, and I’m tickled.
I also can’t stand reading code on the site.
Why?  Frankly, the text is plain old ugly:

Those italicized comments look like faintly-etched glass.  And the bolded bits look clumsy as well (check out the ‘m’ on ‘module’)!
What’s with the ugly?  Let’s ask [...]