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. …
Category: Season 1
Episode #039: Gem Love Part 1
In this, the first of another ongoing occasional series, I revisit an open-source application I started three years ago and begin to rewrite it. Part 1 focuses on building a …
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 #037: Proc and Threequals
Today's dish combines the great flavor of Ruby's 'case' statement with a little Proc seasoning and a threequals demiglace!
Episode #036: Blocks, Procs, and Lambdas
How is a Proc different from a Lambda? When do you use one over the other? And how to blocks fit into all this? Today's episode attemptes to answer these …
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 #034: Struct from Hash
For such similar and broadly useful data structures, Struct and Hash are surprisingly incompatible. In this episode we look at some ways to smooth over their differences, and answer a …
Episode #033: Classes and Constants
On the menu today is an exploration of what, exactly, happens when we define a class in Ruby.
Episode #032: Hash Default Blocks
Following on to the episodes about #fetch, today's episode answers the question: what do we do when we want the same defaulting behavior everwhere a Hash is used?