Per stylistic choice, I typically structure my blog posts in a predictable way. The first is typically a broader…
You may have recalled my previous post, where I share my first experiences with testing and pair programming (yes…
Novice programmers don’t yet have the skills to write simple code.
- Sandi Metz, Practical Object-Oriented Design in Ruby, Chapter 9
You may not think of your software as music but the analogy is apt. The musical score of Beethoven’s Fifth Symphony is a long list of distinct and independent notes. You need hear them only once to understand that while it contains the notes, it is not the notes. It is something more.
This is powerful stuff, and dangerous in untutored hands. However, because this very same power is what allows you to create simple structures of related objects that elegantly fulfill the needs of your application, your task is not to avoid these techniques but to learn to use them for the right…
When deciding between refactoring strategies, indeed, when deciding between design strategies in general, it’s useful to ask the question: “What will happen if I’m wrong?” - Sandi Metz, Practical Object-Oriented Design in Ruby, Chapter 6
If every object trusts all others to be what it expects at any given moment, and any object can be any kind of things, the design possibilities are infinite. These possibilities can be used to create flexible designs that are marvels of structured creativity or…
Interfaces evolve and to do so they must first be born. It is more important that a well-defined interface exist than it be perfect. Think about interfaces. Create them intentionally. It is your interfaces, more than all of your tests and any of your…
The road to maintenance nirvana is paved with classes that depend on things that change less often than they do.
- Sandy Metz, Practical Object-Oriented Design in Ruby, Chapter 3
Unlike theory, practice gets its hands dirty. It is practice that lays bricks, builds bridges, and writes code. Practice lives in the real world of change, confusion, and uncertainty. It faces competing choices and, grimacing, chooses the lesser evil; it…