How to write an object oriented program that doesn't suck

Naveen on November 17, 2016

It is fairly obvious that object oriented program has been used as a silver bullet in the modern day programming. Whether you are working as a te... [Read Full]
markdown guide

In _accountType == "SavingsAccount" you're comparing an int with a string. Just saying. ;)


Great article, one thing though: ExType is not defined in the multiple logger types example


This article is really SOLID :D

for the last part Customer constructor should be Account right?


Using obj as a variable name for the Loggers is bad.

FIX : rename it to logger


Some people (myself included) say that logging also pollutes your class and violates srp. That's why I switched to AOP logging.


Nice explanation of SOLID principles with good examples.


If you're really trying to learn about OOP, read Sandi Metz's Practical Object-Oriented Design in Ruby and 99 Bottles of OOP. They'll teach you solid OOP.


This is one of the best articles I've read, that explain the practical need for OOP with an example !


That was a pretty solid read! (no pun intended) Your examples were great. :)


Really enjoyed reading this as I'm looking into patterns and code structure. The usage of real world examples and requests from the business are excellent.


This article is a fine introduction to the ideas of maintainable OOD and OOP.

code of conduct - report abuse