Member-only story
What People Learned About Object-Oriented Programming Is Wrong
Yes, you started studying OOP the wrong way.
OOP is a paradigm that brings us a series of possibilities to create more efficient software from more elegant and optimized code. However, to benefit from these potentials, it is necessary to really understand what Object Orientation is.
Many colleges teach OOP disconnected from reality. Thus, key parts of this programming model are left out. As a result, a lot of time is spent teaching examples that have no practical application and that don’t help solve real-life problems.
In this article, I will show you why many people learn about OOP wrong and the consequences. I’m also going to talk about the real asset of object orientation, which is often overlooked in university classes.
Class-oriented or object-oriented? (what is not OOP)
One of the main problems, for example, is that most people actually learned Class Orientation rather than Object Orientation.
I remember as if it was yesterday the torture that it was in college to spend an entire semester struggling with abstract diagrams and examples of animal hierarchies that didn’t make any sense. While the focus was on class modeling, all the real power of interaction between objects was ignored.
It was torture and more than that. However, it was such a waste because the essence of Object Orientation has the power to materialize sophisticated ideas, algorithms, and abstractions in simple and elegant code.
What I feel is that it focuses a lot on structure but not on process. As a result, one starts thinking about static objects and not interacting with objects during the program's execution. This linear and sequential structure reflects more procedural programming, which works with steps than the power of symbolic representation that OOP brings.
As I’ve already mentioned, in OOP, knowing how to create classes, define methods, public or private access modes for attributes is not enough. You need to orchestrate the relationship between objects well. For that, it is necessary to use the power of abstraction to think about the result we want with the code being…