Menu Sidebar

Avdi Grimm

Hacker; code documentarian.


Using AlterEgo with ActiveRecord

François Beausoleil has a nice post up demonstrating “how to use AlterEgo with ActiveRecord”: If you’re interested in introducing state-specific behaviors to your ActiveRecord objects, check it out!

[ANN] alter-ego 1.0.0 Released

Today I’m happy to announce the release of AlterEgo, a state-pattern library for Ruby. AlterEgo was born about a year ago, when I found a need to formalize state-based behavior in Ruby objects. I surveyed the existing libraries at the time (a set which, IIRC, consisted of just acts_as_state_machine), and found they didn’t do quite […]

Virtuous Code

"The three virtues of a programmer: laziness, impatience, and hubris" — Larry Wall

Books and Screencasts

RubyTapas Screencasts

RubyTapas Screencasts

Small plates of gourmet Ruby code.

Confident Ruby

Confident Ruby cover

32 Patterns for joyful coding.

The Making of

Confident Ruby cover

Watch me build an app in Sinatra and Rails

Objects on Rails

Objects on Rails

A developer notebook on applying classic Object-Oriented principles to Ruby on Rails projects.

Exceptional Ruby

Exceptional Ruby

The definitive guide to exceptions and failure handling in Ruby.