3 ms·
What annoys me about many OOP people is that they think designing class hierarchies are more important than making the code actually do what it needs to, it's l
by voidr 15y ago
What annoys me about many OOP people is that they think designing class hierarchies are more important than making the code actually do what it needs to, it's like they get bonus points for every new class they introduce. I know sometimes this is the way to go, but most of them to it prematurely and in the end all they have is more code to refactor.
I once had an algorithm composed of 3 functions that had immutable inputs and outputs, it was easy to understand and easy to debug, now a coworker took that and rewrote it into a class, which was mutable for no reason. The results: he had a code that was 5 times larger than the original, and was way harder to understand and debug.
OOP is cool and enterprisish and all that but some people really need to understand that it's not the only way and in many cases it's certainly not the best way.
I think making a code as short as possible without obfuscating it is one of the best ways to start out, all the extra layers can be added later on if required.