I failed at object oriented programming, that’s clear now. I learned basic concepts and then all patterns, read much philosophy surrounding the topic and listened to lectures, but ultimately, I failed. I can’t write good OO code. And now I even don’t want to.
At times, my understanding of OOP was growing and I felt I’m getting somewhere, but after a while it gets boring. I never reached the state where I knew exactly how to write OO code, and more importantly, agree with others on how it should be written. The process goes like this:
- Learn OO concept
- Try to code it
- Have a problem that can be solved by learning a new OO concept.
- Goto 1
It! Never! Ends!
I’m not trashing OO completely. There are many great concepts introduced in or popularized by OO paradigm but none of them are specific for OO. These are generally good ideas and can be used everywhere. Abstraction, modularity, hierarchy, encapsulation, polymorphism… all great concepts. But when you model everything in OO terms, results can be amusing.
So! Much! Code!
Main problem I find is that to work as advertised/taught/preached, OO programs need a very specific environment. To get the benefits of object orientation, one must avoid following environments:
Coding OO programs for environments from this list requires much additional code, introduction of patterns and mostly cancels benefits of object orientation. Modern computing environments is done mostly in such environments and OOP never covered them.