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 evolv…

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 …

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 dep…

Proc and Threequals

Today's dish combines the great flavor of Ruby's 'case' statement with a little Proc seasoning and a threequals demiglace!

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 th…

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 …

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 ove…

Classes and Constants

On the menu today is an exploration of what, exactly, happens when we define a class in Ruby.

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 H…

Observer Variations

Today we revisit episode 21, and try out several different takes on registering observer callbacks inline.