r/java • • Sep 10 '21

Why people don't love Java?

I came across this post in r/cscareerquestions it seems majority of the people don't love to work with Java.

Is there any specific reason for that?

Edit: Thank you guys for your responses, I can't reply to all of the comments because I'm a beginner myself and I don't know what to reply for all your comments.

201 Upvotes

379 comments sorted by

View all comments

542

u/thomascgalvin Sep 10 '21

The people posting to that sub are typically young, and probably have more experience with Javascript than anything else.

Compared to JS, Java can feel heavy and constricting. Lots of boilerplate, a type system that's strictly enforced by the compiler, and so on.

It isn't until you have some real-world experience, with code spread out across dozens or hundreds of files, that you realize the "limitations" of Java are actually meant to prevent you from blowing your own foot off.

137

u/Gk2k08 Sep 10 '21

Agreed here. I worked on a Django project(when it was the cool thing) and thought that python is so better than typed languages(It has its uses but not in a complex system with 1000s of classes). Once this project scaled up from me being the only developer on it to have multiple people and having more than 10k lines of code it became a complex piece to maintain. If there is no unit test case for all the scenarios the only place you would see an error is in runtime. Imagine doing int + string in your log statement and that brining down prod app and having to rush a fix for that.

8

u/Oo__II__oO Sep 10 '21

Thank you for this. I'm tilting at windmills trying to get my management team and adjunct R&D team to agree on a language for production tools, and they both are pushing for Python or JS, while I am telling them a strict typed language with rules makes more sense. They don't feel the pain when the system goes down because of some untested edge case, but are more interested in deploying quickly and not spending a lot of time on code management (just what is easy for them).

2

u/Gk2k08 Sep 10 '21

It always depends on how complex your tool will be, how many devs will be working in that simultaneously, how critical is the uptime, do you need real multithreading, what is the performance expectation for your tool, how good the Dev's working on this will be etc.

Regardless of the fact that you win your battle or not, if you can setup static lint checkers, unit tests/integration tests with code coverage almost 90% with the SDLC gates in place you would be guaranteed and good night's sleep.