Guidance on how to break down problems and structure solutions.
Category: Design
Episode #040: Gradual Stiffening
In today's episode we'll try to come to grips with a slippery quality---a quality which is of importance to differentiating code that is easy to evolve, from code that isn't. …
Episode #038: Caller-Specified Fallback
Sometimes it's hard to decide how to handle a failure in a method call. Raise an exception? Return a nil? Log an error? The best choice may differ depending on …
Episode #035: Callable
Many different kinds of Ruby objects respond to #call. Today's dish is a demonstration of how this fact can be harnessed to easily swap out different implementations of a collaborator …
Episode #031: Observer Variations
Today we revisit episode 21, and try out several different takes on registering observer callbacks inline.
Episode #021: Domain Model Events
In this episode we take a look at a common problem in Rails development: slimming down a controller whose functionality can't easily be pushed down into models. We address the …
Episode #019: Pluggable Selector
In today's episode, we revisit episode 11 (Method and Message), and take a look at a way to make the coupling between objects even looser, by making the name of …
Episode #017: Pay it Forward
In this episode, we explore command/query separation by looking at what happens to unit tests when the separation breaks down.
Episode #011: Method and Message
A look at the difference between methods and messages, and why passing methods around isn't as common in Ruby as it is in e.g. JavaScript.
Episode #004: Barewords
In this longer-than-usual episode, some thoughts on how to enable method logic to remain stable and unchanged while evolving and changing the source and scope of the values used by …