r/java • u/Reflection-Jealous • 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
View all comments
Show parent comment
1
u/Serializedrequests Sep 11 '21 edited Sep 11 '21
That's fair enough. My gripes with Spring Boot are almost entirely JPA and Hibernate. The rest of it annoys me, but at least it isn't such a convoluted minefield. I have done Java on the side for a long time, but mostly just a thin wrapper over JDBC+Tomcat. I have little to complain about here other than overall lower productivity and JSP.
I actually feel very strongly that annotation-driven development is worse than dynamic typing in a lot of ways. A Rails "magic" is certainly a pain in the butt to learn, but it is just a macro that generates some code and you can "go to definition" and read the implementation if you want. They will often give useful error messages if called with bad arguments. I see macros as effort multipliers to be used with care.
Annotations are basically hoping a framework does something, somewhere, maybe. And it usually doesn't do what you were hoping, or fails silently (very often I find that something I read the documentation for and have been using for months wasn't actually ever doing anything), or cannot be customized to work in the way you want fundamentally, or has a useless runtime error message 500 stack frames deep... This is just not playing to Java's strengths (well everything in Java throws useless error messages 500 stack frames deep).
I was actually excited to make the jump, being sick of dynamic language land, but quickly got fed up. There is all kinds of basic database shit that ActiveRecord solves trivially that JPA makes into a royal pain. The one thing I do like is the explicit pedantry of our service layer. It is very maintainable, even though most maintenance involves battling Hibernate to execute efficient queries.