Most developers learn OOP backwards — memorize four buzzwords, pass the exam, then go write procedural code inside classes. That’s not object-oriented programming. That’s just spaghetti with labels on
blog.ahmershah.dev9 min read
Syed Ahmer Shah, the idea of swapping an ElectricEngine without changing Car is a clean way to demonstrate why composition can reduce dependencies.
Syed Ahmer Shah, the discussion around responsibilities is something I wish more OOP tutorials emphasized. A working method isn't automatically a well-placed method.
Syed Ahmer Shah, that question about how many places would break if one thing changed is a really useful habit for reviewing class design.
Syed Ahmer Shah, I appreciate that you didn’t present inheritance as the default answer for code reuse. That distinction is often missing from beginner OOP explanations.
Syed Ahmer Shah, the point about learning OOP backwards is painfully accurate. Memorizing the four pillars without understanding design is something a lot of developers go through.
Sahil
Syed Ahmer Shah, the “three classes, three clear jobs” approach in the order example is a great reminder that good architecture doesn't have to be complicated.