Hi! I'm Avdi Grimm, and this is my software development blog. More...
Books and Screencasts
Small plates of gourmet Ruby code.
32 Patterns for joyful coding.
The Making of Cowsays.com
Watch me build an app in Sinatra and Rails
Objects on Rails
A developer notebook on applying classic Object-Oriented principles to Ruby on Rails projects.
The definitive guide to exceptions and failure handling in Ruby.
- Emacs Reboot
- RubyTapas Samples
- Smalltalk Best Practice Patterns
- Study Notes
- Stuff Worth Buying
- Stupid Ruby Tricks
Tag Archives: ruby
Announcing the display_case gem, an implementation of the Exhibit pattern described in (and extracted from) “Objects on Rails”. Continue reading
I recently visited the Hashrocket offices in Jacksonville, and while I was there I did a Lunch & Learn talk on the topic of of breaking down too-big classes into smaller pieces. In it I went over pros and cons … Continue reading
Part two in my “live”-style screencast series is now available! Watch me code up a small web app from scratch using test-driven development. In this hour-long episode, I switch from integration testing to unit testing in order to drive out … Continue reading
One of the points I try to make in Objects on Rails is that you don’t need to let other libraries or frameworks dictate the public face of your objects. Just because you use ActiveRecord, for instance, to persist the … Continue reading
@CapnKernul writes: [do you know of] a Ruby idiom for converting an object to a type if it isn’t already that type. For example, if you want to only store an attribute of type Foo, you could write an accessor … Continue reading
A couple weeks ago I created cowsays.com, in an effort to introduce the joy of Cowsay to more people. In the announcement I talked about how I created the site over a 24-hour period (not counting some UI tweaks). What … Continue reading
I find the subject of starting and interacting with other OS processes fascinating. A few years ago I wrote a never-completed series on the many ways to spawn off processes in Ruby: Part 1: Backticks and system() Part 2: Opening … Continue reading
An exploration of why unless…else in Ruby is problematic at best. Continue reading
I was briefly concerned that thread-local variables would not also be Fiber-local, since fibers have their own stack. This would be a problem for any code which uses thread-local variables to delimit a stack context, e.g. to implement dynamically-scoped variables … Continue reading