this post was submitted on 16 Jul 2023
1279 points (98.9% liked)
Programmer Humor
32613 readers
46 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Ool about it. Where does the java hate come from?
OOP is fine. It's particularly Java culture that's terrible.
I never want to see the word Factory in a class name ever again.
When a Java dev writes in any other language, you can tell. Too many layers of abstraction is a key indicator. They make simple problems complex.
I once inherited a C# website project from a Java dev. I couldn't even figure out how to modify the CSS. And I'm a C# dev.
Factories can be good in moderation. If you make factories for every class, maybe you need to rethink your practices.
I've worked with Java for decades (kid you not: learned it from reading the Java Language Specification 1.0 back when it came out) and there's definitivelly a stage (often a long one) in one's career when one thinks him/herself so great at OO and just overengineers every single software design way (way, WAY) beyond the actual objective of behind the whole OO design concept (maintenability and bug reduction), actually achieving the opposite objectives (an unmaintainable POS, riddled with hard to track bugs because of way too many unnessary details having overwhelmed the developer's ability to keep track of it all).
Eventually you learn KISS design and Refactoring as a sort of housekeeping practice for code and design.
But yeah, as a freelancer I've very commonly landed in the middle of maintenance-stage projects with existing code bases that were clearly done by somebody at that oh-so-special stage in their career, and often it's better to just reverse engineer the business requirements from the application and redo the whole thing (in the process cutting the codebase size to a small fraction of what it was).
I was part of a fun era at my university where they switched from C++, which is what I took in intro to programming, to java. So by the time I was doing some group projects senior year, I was working in C# with people who had only done Java.
They wanted to abstract everything. Everything had to be a class. Any time they repeated 2 lines of code it got put into a helper class.
We ran into an issue where the code just would not run no matter how hard we tried and of course no one on the project but me bothered to use git (they would literally send me the zipped up project on discord and I had to copy and paste everything into the actual code). I ended up rewriting the entire project overnight. It actually wasn't that bad once I got into the flow of things. Turns out none of them knew how to program without being explicitly told how.
Still not the worst college group project though. Maybe top 5.