Something out of Nothing: Null Object Pattern

What is nothing? nil? null? 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.

Continue reading “Something out of Nothing: Null Object Pattern”

Composition over Inheritance, with JavaScript examples

If you are into object-oriented programming, you most likely have heard about composition over inheritance. The concept itself is simple: Whenever possible, prefer to compose objects rather than introducing inheritance.

Continue reading “Composition over Inheritance, with JavaScript examples”

Common Code Smells in OOP

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”