OOP and other things now and then
Approximate conversation at work the other day:
Yeah, I split this into separate files, removed this and made these classes to make it actually work.
Ok, but don’t go too fancy with objects here.
Sure! I think it’s the only place where I actually use inheritance!
Heh. I’d imagine how that would have looked back some 5 years ago. “What design patterns did you use here?” etc. Funny how things change.
I think I’ve got it by now - took me way too much time for such a trivial thing - there is no silver bullet. OOP or any other buzzword is just a means to do something; sometimes it fits, sometimes it does not. Regarding OOP, I highly recommend Execution in the Kingdom of Nouns essay - it’s way exaggerated, but has the point. The best part:
advocating Object-Oriented Programming is like advocating Pants-Oriented Clothing
There is one thing about the codebase that we have at work that I love: it does not use any particular design/programming technique. A bit of OO, a bit of metaprogramming, a bit of plain C style, a bit of preprocessor macros, etc. I like to think that we’re using the best of those worlds, of course :)