The decorator pattern is one of my favorite patterns. It is simple, extensible and powerful. It feels like it follows the essence of object oriented programming beautifully. Sadly though, it is also easy to be misused or misunderstood. So, in this post I will show you the essence of the decorator pattern, illustrated with a few examples.Continue reading “OOP Fundamentals: The Decorator Pattern”
The dependency inversion principle is one of the cornerstones of object-oriented programming. Without it, there is no object-oriented design. It’s that important.Continue reading “OOP Fundamentals: The Dependency Inversion Principle”
What is nothing?
undefined? A vast void of emptiness that fills your soul with dread? Oh sorry, that’s just my stomach.
We often think of nothing as… well, nothing. It’s when something doesn’t exist and therefore cannot be interacted with. So in our code, we try account for having nothing. No
User? No problem.
Over years of reviewing Ruby code, the same things tend to come up over and over. In this post, I’d like to address some of the most common code smells I find when reviewing OOP code (and Ruby code in particular).Continue reading “Common Code Smells in OOP”