Guidance on how to break down problems and structure solutions.
In another peek into my ongoing behind-the-scenes work on RubyTapas, today I extract the responsibility for representing a logged-in screen-scraping user-agent session into its own class.
In today's live-recorded episode I show one of the most fundamental refactorings for breaking up a large class into smaller classes. Since this is a live episode there is no …
In today's episode, we encounter a starship in trouble, and a software pattern that helps cleanly disable whole categories of behavior.
In this episode we take a look at the Special Case pattern, and see how it can be used to drastically simplify some typical logic around logged-in and anonymous users.
This episode explores some of the many ways we can come across a nil value, and why that's a problem.
Not all refactoring is about eliminating duplication. In today's episode we'll refactor some code for the purpose of revealing intent to future readers.
Katrina Owen contributed an example of coincidental duplication I liked so much I decided to make a second episode about it. Enjoy!
The DRY principle teaches us to get rid of duplication wherever we find it. But not all duplication is created equal...
Naming things is hard, and it's difficult to come up with hard-and-fast rules for it. But it can be helpful to learn from examples of real-world naming decisions that led …