OOP Complexity

Despite its many benefits, some view the OOP paradigm as often being unnecessarily complicated, with a sizeable hardware footprint, and generally requiring more elaborate preparatory planning. While I cannot offer any specific tips or techniques that may be used to minimize or eliminate some of these inherent OOP disadvantages, I strongly believe that at the end of the day, it’s the application architecture and proper planning, that may come to rescue. Let me explain…

Edsger Wybe Dijkstra, a famous Dutch computer scientist, came to a conclusion that “Object-oriented programming is an exceptionally bad idea, which could only have originated in California.” and Joe Armstrong, the creator of the programming language Erlang, once said that the biggest problem of OOP is its complexity: “You wanted a banana but what you got was a gorilla holding the banana and the entire jungle.”.

As we can see, these are all some adamant words, but I agree with the sentiment. The OOP paradigm is complex and the development using one of the OOP languages can get real messy and do so really quickly. Simply said, it can get complex to a point that OOP would no longer provide any benefits.

That said, I still think it’s a right approach to developing the software. We just need to be way more careful when it comes to application architecture and planning.  Approach to the construction of OOP applications should be rooted in simplicity and clarity, meaning that the software architects need to work with business owners and address the design well ahead of development time. The only way to resolve the issue of OOP complexity is to write an OOP code that is rooted in simple and elegant architecture design, planned way ahead of development and actual coding.

We need to realize that if we want to use OOP, we really need to emphasize application architecture, only then we will end up with a code that is reusable. This is the only way to use OOP effectively and the only way to come up with a less verbose, more descriptive and better readable OOP code; that will be easy to maintain and modify.

When it comes to OOP, the saying that we should measure something twice, before we decide to cut once, holds especially the merit. So the initial planning phase is crucial when designing such applications. Planning and prototyping, doing functional specs and visual illustrations, mockups, active wireframes, maps, etc., all these as well as designing an architecture that has an effective reuse in mind, are all super important. Simply put, defining proper OOP app architecture should reign supreme in terms of priorities, as that is what will makes the development process smoother and less likely to fail. While this type of approach tends to be initially time consuming, it’ll promote money savings and better experience in the long run.

Linus Torvalds, creator or Linux, in 2007 stated, that the only way to deal with OOP issues in C++ was to use a structured programming in C language. Torvalds stated that “Limiting your project to C means that people don’t screw that up, and also means that you get a lot of programmers that do actually understand low-level issues and don’t screw things up with any idiotic ‘object model’ crap.”.

So perhaps this last quote should also serve as a reminder for all of us, that while there are some undeniable huge benefits tof using object oriented programming, it may not always be the solution to everything.

 

References

Talk: Edsger W. Dijkstra (2014) Available at: https://en.wikiquote.org/wiki/Talk:Edsger_W._Dijkstra (Accessed: 27 September 2016).

Barker, J. (2013) All evidence points to OOP being bullshit. Available at: https://blog.pivotal.io/labs/labs/all-evidence-points-to-oop-being-bullshit (Accessed: 28 September 2016).

Bugayenko, Y. (2016) What’s wrong with object-oriented programming?. Available at: http://www.yegor256.com/2016/08/15/what-is-wrong-object-oriented-programming.html (Accessed: 28 September 2016).

Importance of Prototypes (2016) Available at: http://www.methodfactory.com/about/articles/general/importance-of-planning-in-software-development (Accessed: 28 September 2016).

How do you design object oriented projects? (2016) Available at: http://stackoverflow.com/questions/1100819/how-do-you-design-object-oriented-projects (Accessed: 28 September 2016).

 

Comments

comments