I wish I could read this article with a clear mind, but the author's stance is just so... bloody arrogant that I have a hard time doing it. How can you say that object orientation is "objectively bad" when most of the best software in the world is written using object-oriented principles? I dunno — maybe the decades of research starting all the way from Smalltalk have actually been conducted by very intelligent computer scientists who knew what they were talking about? In my experience, it seems that it's mostly old-school programmers in their 40s who prefer the described imperative approach. Given the absolute cornucopia of fascinating new programming paradigms out there today, I feel that they're a bit stuck in the past.
Additionally, I know of literally zero programmers who write things out on index cards and create rigid Employee/Manager/Contractor-like hierarchies.
(With that said, enough smart people have complained about OO that I'm willing to give it more thought.)
Of course the author is taking things to the extreme to show his point, but that doesn't mean his point is invalid, or that these issues aren't real. I've seen a plethora of horrible code over the years in the enterprise...code you wouldn't even believe that came from "professional" developers from big name companies (IBM and AMD as my most recent examples)...I've had the great displeasure of going through code (usually in Java) that has come out of Indian and Chinese "code shops" where 10$ an hour developers crank out code for the enterprise which is absolutely OOP to the extreme. I've had management at various client offices try to do "agile" by pre-defining everything through requirements documents turned into code objects which are heavily abstracted. And these are all multi-billion dollar corporations. I've been tempted to start a blog just to show examples of what not to do that I find on a daily/weekly basis at large enterprises in their software. The point is, there are pros and cons to most programming techniques, and all of them can be abused. Less experienced developers (or experienced shitty developers) are given tools without an understanding of when they are appropriate. OO is a tool, and as the saying goes...when you're holding a hammer, every problem looks like a nail. Not every code problem is best solved with objects. :)
Don't focus on the negative. Developers love to bitch and moan about bad code, but will never show mediocre or good code to others. I've seen bad code and I've seen code that looked bad until I actually understood what it accomplished.
The point being: read a lot of code. Corporate code, open source code, game code, microchip controller code. Each has its quirks and requirements that don't make sense when looked at from a different perspective.
I guess I didn't make it clear that I consider good examples to be part of "ways to avoid". Like you, I see a lot of examples of bad code, but not a lot of examples of how to fix it or how to avoid it. I think that needs to change if these "don't do this" bits are to be taken seriously.
5
u/archagon May 28 '14 edited May 28 '14
I wish I could read this article with a clear mind, but the author's stance is just so... bloody arrogant that I have a hard time doing it. How can you say that object orientation is "objectively bad" when most of the best software in the world is written using object-oriented principles? I dunno — maybe the decades of research starting all the way from Smalltalk have actually been conducted by very intelligent computer scientists who knew what they were talking about? In my experience, it seems that it's mostly old-school programmers in their 40s who prefer the described imperative approach. Given the absolute cornucopia of fascinating new programming paradigms out there today, I feel that they're a bit stuck in the past.
Additionally, I know of literally zero programmers who write things out on index cards and create rigid Employee/Manager/Contractor-like hierarchies.
(With that said, enough smart people have complained about OO that I'm willing to give it more thought.)