Hi! I'm Avdi Grimm, and this is my software development blog. More...
Books and Screencasts
Small plates of gourmet Ruby code.
Watch me build an app from scratch.
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.
Category Archives: Ruby
How I avoid finding myself in database bizarro world while testing Rails apps. Continue reading
In this excerpt from “Confident Ruby”, I talk about mimicking Ruby’s own “implicit conversion protocols” in your own code. 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
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
A reply to Josh Cheek’s post “Modules called, they want their integrity back”. 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