Idioms and stylistic preferences for readability and malleability.
Today's episode is about a semantic convention for error handling that I learned from Jim Weirich.
Ruby doesn't have a built-in concept of "abstract" classes, but sometimes we want a way to show other programmers when methods are left as an exercise for the implementor. This …
Nobody wants to debug an "undefined method for NilClass" error. Today's episode shows a little trick for making these errors more meaningful.
Have you ever found yourself looking for a '#to_bool' method in Ruby? This episode explores why boolean conversion isn't needed as often as you might think; as well as how …
Ruby gives as a number of options when it comes to defining class methods. This episode starts by demonstrating three of them, and then gets a bit opinionated.
It's a small thing, but judicious use of inline assignment can make code more DRY and concise. In this episode we look at how to do it, and when.
A number of Ruby standard library methods return an Enumerator if no block is passed to them. In this episode, we'll learn how to emulate this behavior in our own …
Sometimes a utility module is overkill. In this episode, we make a namespace module do double-duty.
Some functions are useful in many different contexts. In this episode we'll explore some ways to make them available both to library code and to client code of a library.