@monastyrskiiden Thanks for asking! My book is very different from Head First. I tie things into a bigger narrative. It’s not a catalog of patterns. I show how the same mechanisms take different forms in the same language. And combine to solve more complex problems.
@RickyAudet@leanpub My apologies for the lack of communication. The book is updated quite frequently (in bursts) so I have opted to not send notifications to spare readers from being spammed with email 😊 Hope that you understand 😊
The Object Oriented Way by Christopher Okhravi (PhD) @chrokh is the featured book on the Leanpub homepage! #ComputerProgramming
About the Book
Have you ever wondered why there are so many rules in object oriented programming?
I asked myself that question a decade ago. This book is the result of everything I’ve learned since.
I'm Christopher Okhravi (PhD), a Senior Lecturer at Uppsala University and a YouTuber with over 150,000 followers. I’ve spent the last ten years decoding OOP — so you don’t have to.
This is a practical, language-agnostic guide to OOP. It gives you mental models to reason about complexity and choose the right abstraction at the right time.
I use it in my own teaching. Now, it can be yours.
Find it on Leanpub!
Strategy is a concretion composed with an abstraction. Bridge is a concretion composed with an abstraction… that’s composed with another abstraction.
In other words: Bridge is what happens when you nest Strategy.
In life, we tend to overthink. We research, analyze, compare, and stall — all to avoid failure.
But most of the time, we’d be better off making the wrong decision faster.
Momentum matters.
My book only covers 8 design patterns.
Because patterns are a lens, not a catalog.
Understand the core mechanics, and you’ll understand the rest.
Strategy, Bridge, Composite, Decorator, Iterator, Factory Method, Observer, Visitor.
☀️ https://t.co/XK3PvuNitI
Make good bad decisions. Quickly.
Ones that you can recover from.
In software, choose abstractions that are easy to change.
In life, make choices that won’t kill someone or their sanity.
In business, make choices that maximise learning.
@FUCORY My apologies for expressing myself vaguely. I was addressing languages that support default interface methods. Where you can actually have methods with implementation in the interface. That provokes the question of inheritance vs interfaces.
When possible, we should pick interfaces because they are more flexible. A class can only inherit from *one* class but can implement *many* interfaces.
So here's the rule of thumb:
> Use interfaces unless you need state.
When coupling to abstractions rather than concretions, all instantiation either happens in the main entry point of the application or in factories.
And that's the key reason why we have the factory method pattern.