idioms

Bouncer Method in Ruby

In which we discover a micro-pattern for extracting method input validations… with a uniquely Ruby twist at the end.

Interpolation over Concatenation

Why do Ruby programmers use so much String interpolation where other devs might prefer concatenation? Join Jessitron and Avdi for a dialog on language design, idiom, and history!

Nested Class

Want to cut down on the mental friction of good object design? Use this organic approach to sprouting new classes in Ruby!

Numbered Parameters

In a language full of expressive little shorthands, it’s time to meet a new idiom! This one makes simple blocks even more concise.

yield_self

Discover how to use Ruby’s `yield_self`/`then` method to organize methods into neat pipelines of operations! Join guest chef Nithin Bekal for an educational and satisfying refactoring sequence.

Minimum Viable Method

Is there such a thing as a method that is too small? Is it worth it to extract a method just to satisfy a guideline like the Law of Demeter?