Tag Archives: patterns

Active Record Soup

Once upon a time there was a small but prosperous village.¬†This village had a reputation¬†for being tech-centric. It was populated mainly by enterprise consultants, software architects, and agile coaches. The denizens of the village had grown wealthy and contented from … Continue reading

Posted in Rants | Tagged | 1 Comment

Modeling the World with Prototypes

This post started out as the second half of an article on prototype-based OO design for Gregory Brown’s Practicing Ruby. For an introduction to the prototyped view of the object world, and to follow along on an adventure in making … Continue reading

Posted in Design, Ruby | Tagged , , , | 10 Comments

DisplayCase Gem Now Available

Announcing the display_case gem, an implementation of the Exhibit pattern described in (and extracted from) “Objects on Rails”. Continue reading

Posted in Announcements | Tagged , , , , , , , , | 5 Comments

Making Little Classes out of Big Ones (video)

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

Posted in Presentations, Videos | Tagged , , , , , , | Leave a comment

Decoration is best, except when it isn’t

I think by now we all know to prefer composition over inheritance. But in a language with a lot of options, what’s the best kind of composition to use? Composing an adventure Consider an adventure game, with objects representing player … Continue reading

Posted in Ruby | Tagged , , | 14 Comments

SBPP #4: method Cascades

In Smalltalk, you can “cascade” side-effectful calls to the same object using the semicolon (;) operator. E.g.: If I understand it correctly, the semicolon is effectively a K-combinator or “Kestrel”. I am jealous. Sure, we have Object#tap, but that’s awfully … Continue reading

Posted in Smalltalk Best Practice Patterns | Tagged , , , , | 7 Comments

SBPP #3: Reversing Method

I’m pleased to find Kent Beck shares my affinity for methods with a consistent cadence. In the next pattern I translate, he looks for a way to bring a uniform rhythm to a method that writes an object to a … Continue reading

Posted in Smalltalk Best Practice Patterns | Tagged , , , | 2 Comments

SBPP #2: Smalltalk Patterns in Ruby

Smalltalk Best Practice Patterns continues from the introduction with a brief explanation of patterns. Some notable quotes: About leveraging commonality: “large-scale software re-use has not proven to be the answer”. A lot of the mid-90s OO PR centered around the … Continue reading

Posted in Smalltalk Best Practice Patterns, Uncategorized | Tagged , | 4 Comments

SBPP #1: Introduction

The Ruby Rogues are reading Smalltalk Best Practice Patterns for next month’s book club, so I finally got around to ordering a copy. It’s high time, considering that in my experience it’s one of the most consistently recommended programming books … Continue reading

Posted in Smalltalk Best Practice Patterns, Uncategorized | Tagged , | 4 Comments

Your Code is My Hell

It occurred to me recently that my experience as a Rails developer may be somewhat unique. I often get brought in to help preexisting Ruby/Rails projects evolve and mature in a sustainable way. As a result, the vast majority of … Continue reading

Posted in Rails, Rants, Ruby | Tagged , , , , , | 125 Comments