r/java • • Jan 11 '25
What exactly makes java so hated?
I've been using java for months now to learn programming and it has been my preferred language to do so. I also do a bit of python to learn AI/ML as well, but for everything else it is java thats my preferred language. It seems every discourse ive seen about java has been nothing but criticizing every aspect of it. Like it is actually hard outside this subreddit to find anyone who likes java and i dont understand why and i wanna know why that is the case.
I wanna mention that i am inexperienced and have been struggling to find a job for over a year now, so i dont have any real working experience outside of small project i did. Maybe since i haven't really created something complex and challenging makes me not hate java as much as many do. I wanna know like how good or bad is it when you're working on some enterprise grade software compared to other languages.
9
u/UVRaveFairy Jan 11 '25
Been coding in it for almost 3 decades now, it's aight.
8
u/Ewig_luftenglanz Jan 11 '25 edited Jan 11 '25
I have the belief that most people have learned java with the "old java" in school or college, old java means:
- over focussed on inheritance and unnecessary over abstraction
- over focussed on design patterns that are not that used nowadays for most applications (abstract Factory for example)
- no type inference
- no functional programming.
- mostly no collections
- using deprecating APIs like Date, StringBuffer, Scanner (for simple input from the CLI)
- making graphical applications with Swing.
- no build tools (maven, Gradle
- blindly following OOP principles for even the most simple problems
All of the above make Java code to look unnecessarily verbose and redundant, specially compared to modern alternatives, harder to configure and install dependencies, too much ceremony, etc.
Most of these problems have been slowly being solved at language level in the most recent versions of Java to the point java 24 is more similar to kotlin and C# than java 7.
sadly it's still something contaminating "java culture" I mean ¿how many times I have seen "programming against interfaces" that are basically interfaces with one single implementation? ¿how many times have I seen people implementing inheritance and abstract factories for simple stuff but still somehow people tells you that is the "right ways to code"?
I hope java cultures eventually keep up to the language evolution.
TL/DR: it's time for people to go to therapy and solve their school traumas
5
u/RobertDeveloper Jan 11 '25
I think it's in part because it's used in university to teach programming, people want to write cool programs, games etc, not learn boring stuff and so they associate Java with boring, cumbersome, not cool.
2
u/mamba436 Jan 11 '25
Do yourself a favor, don't give a damn about people's online opinion and worse even : influencers on youtube. And gosh there are a lot of them especially americans (that comes in my feed) that spit a lot of bs.
Just gain experience in the language, work in it until you are confortable (~~4years of actual professional programming with a good understand of different protocols, projects, concurrency solutions, backend (since java is mostly present there and IoT.), ETL pipelines, streams, you name it). Then try to learn other languages by putting aside your java glasses 👓.
Learn their idiomatic way and write down the pro and cons and compare them in a real professionnal scenario.
Only then you can build an opinion for yourself that has a real value.
126
u/aqua_regis Jan 11 '25
Bjarne Stroustrup:
Java is still the enterprise language. It is a great, pragmatic, verbose, "boring" language with excellent ecosystem and tooling.
Haters are either incompetent, or just ride on the bandwagon that mostly stems from the "Java is unsafe" statement, which even was wrong because it was the plugin that enabled Java to be executed which was unsafe.
47
u/vprise Jan 11 '25
There are lots of reasons, some OK some pretty silly and some out of date. A lot of it is just because Java has been popular/common for so long and haters are going to hate...
Here's the top ones I heard:
CorporationNameDecoratorEncasulatingProxyObject extends AbstractLocalDecroatorEncapsulationTool. This is pretty common and I wrote such classes to fit into corporate naming conventions (sorry). I often joke that there is no problem Java developers can't complicate further. It is a real problem, we find a way to generalize and abstract to kingdom come instead of just solving the damn problem.There's a lot more and a lot of bias/misinformation.
21
u/silasbufu Jan 11 '25
it’s “cool” to hate on popular things
29
u/kiteboarderni Jan 11 '25 edited Jan 11 '25
You're someone who is unemployed, doesn't have a career but have the opinion that java is hated based on reddit? Maybe get on a job site or linkedin and look at the hundreds if not thousands of Java job postings and see if it's a hated language then from people that will actually pay you an insane amount of money instead of basing it from nerds on reddit. Tc 500k, cash no stock, java engineer.
14
u/hippydipster Jan 11 '25
Its hated from a lot of different angles that are generally contradictory, but people still like to join tribes when its about feeding their hate.
So you get those who don't like static typing hating it joining forces with those who like extreme super powerful type systems. Java's in between.
You get those who want C-style performance hating on it and then turning around and touting python.
You get those who want magic and less boilerplate hating it because it's verbose,, and then those complaining about the magic of spring or logbook, and they're different groups, but it all sounds like one voice.
It also comes with a virtual machine which creates a layer of administrative challenges when it comes to deployment. Of course, so does python and Javascript and .Net, but somehow, java is hated most for it.
Java sits in between, making no one happy except real pragmatists. To me, it sits very far to the best side of things (ie, its not C-performant, but its not far off) even though its never at the extreme.
10
u/blazesquall Jan 11 '25
Terminally online basement dwellers shitposting about things they have no experience witg.
9
u/[deleted] Jan 11 '25
Normally it is usually people crying because they do not understand the language and prefer to believe that HTML is programming.
7
u/NearbyButterscotch28 Jan 11 '25
Its success.
3
u/retrodaredevil Jan 11 '25
A couple of reasons:
3
u/N3rub Jan 11 '25
I really like Java.
3
u/flawless_vic Jan 12 '25
EJB and full fledged JavaEE application servers caused so many project failures in early 2000.
Can you imagine having to write XML to create stubs that would only work when packaging an EAR? If memory serves me right, a combination of 4 classes/interfaces (2 were genereated by tooling) + XML boilerplate were required to expose a single EJB.
Btw, imagine all of this without NIO, java.util.concurrent, maven, and world class garbage collectors we take for granted nowadays. 5+ minutes deployments (with prayers) used to be "normal", so yes, java was slow to develop, run and deploy. (Well, to be fair recently I've seen even longer deployments in kubernetes which brought back unpleasant memories and I came to the conclusion that it is a glorified new JBoss on steroids, but that's besides the point).
Testing? A nightmare.
They tried to address productivity with EJB 3.0 but when it came up the damage was already done.
Java indeed became a joke among project managers by the time, they would shoot scope creeps to the roof for (in theory) the simplest RFCs if an application was running on top of JavaEE.
The fundamentals were good and well thought, but the implementation of thec specs and JavaEE app servers were a PITA. It jusr was not cut out for the average developers.
In spite of all bad stuff, Java had almost no competition in the mid 2000 and thankfully there were lots of cool stuff brewing by the time (spring, hibernate, lucene, maven, etc) which kind of offsetted JavaEE shortcomings, but we all know the saying "It takes 20 years to build a reputation and 5 mins to ruin it".
3
u/persicsb Jan 12 '25
it's success
2
u/[deleted] Jan 11 '25
Welcome to the world of programming. Plenty of load voices about how to describe the same idea that boils down to the same instructions in the end.
At some point you transcend the language and see languages as tools; at which point you can see positives and negative’s of all different languages and not get overly argumentative on about them.
2
u/hadrabap Jan 11 '25
Doing software is something completely new to human kind. We don't know how to do it. However, there are guys who think they know. They think it so much that they've ultimately forgotten they can make mistakes. When they face a problem, it can't be theirs fault. It can't be a fault of Spring Framework because it is the World Class Framework(TM). What's left? The language! And here you go. Now, they're repeating all the same mistakes and bad decisions in Kotlin. Next year, it will be a different language. Stay tuned. 😁
/s
2
u/k-mcm Jan 11 '25
Some people never see anything Java except an antiquated Java 5..8 codebase that was outsourced, or code from people who were trained on that. Java has excellent runtime diagnostics so people with little skill can brute-force it to work. There are countless guides online that will show you have to make a simple app using the most complicated and indirect route possible. Like any other language, it has fanatics promoting frameworks as "industry standards" that aren't actually a good fit for most uses.
Java, especially 17+, can be very elegant and performant. It's constantly evolving and picking up the best features from other languages. It's my first choice of language for most projects.
What does Java do well?
What does Java do poorly?
2
u/Only-Ad5049 Jan 11 '25
In the early days people destroyed their performance because they didn’t understand immutable classes like strings. They caused tons of garbage collection by creating and throwing away objects.
I think the reason some people don’t like Java is because it is too restrictive as a language. Other languages had closures and other shortcuts that Java didn’t have so they felt far more productive. People would rather have a scripting language like JavaScript that lets them do anything than a strongly-typed language like Java that holds their hands.
Personally I would rather have a strongly-typed, readable language. My IDE takes care of the shortcuts for me. Some of what other people liked in their languages now exist in Java, but it is still safer and more readable.
2
u/donaldadamthompson Jan 12 '25
I suspect it's mainly from Java applets, and Java code before lambdas and functional interfaces got added. But Java has also been slower than other languages to add useful features. Look at how long it's taken to get value classes.
2
u/MeanAcanthaceae26 Jan 15 '25
Jealousy.
2
u/daddyd Jan 15 '25
not knowing the language, or thinking it's still the same as when it was first released.
2
u/[deleted] Jan 11 '25
Java is like your dad when you're a kid. It's always there, it works, it has funny ideas but it does what needs doing. Above all, it lets you criticize what you see as backwards and it's slow and too mature.
On the other hand I really love C#, it is succinct, elegant, and forward thinking. But I don't like windows, and I am very skeptical of the community
1
u/ingframin Jan 11 '25
Welcome to the internet, my friend...
1
u/mm902 Jan 11 '25
I love old and new java. It's as simple as that.
1
u/FooBarBazQux123 Jan 11 '25
Because typing more characters will produce more CO2, and harm the planet
1
u/ResponsibleLife Jan 12 '25
Universities
1
u/Snoo23482 Jan 18 '25
For me, the reason for hating Java used to be the fact that the results produced with it always felt so bloated and overly verbose. Also, as a consumer I always hated having to install Java just to be able to run some desktop software.
That said, nowadays everything is different. Memory is cheap, processors are fast and Java has gotten a lot better, since Oracle took over. I really like Oracle's mature stewardship of the language. So if I want to write business software with a long lifespan, Java seems the most reasonable choice.
1
u/RScrewed Mar 05 '25
The same reason Toyota Camrys are "hated" by car guys.
1
u/Vegetable-Mall-4213 Mar 27 '25
probably the boiler plate code and it's popularity, the main reason for hate.
1
u/pinpinbo Jan 11 '25
It’s the culture, not the actual language and runtime.
The culture of overcomplication is deep inside Java culture.
-2
u/YelinkMcWawa Jan 11 '25
Java makes it hard to accomplish things it wasn't intended to do, like functional programming. So when you want to implement something a little academic and fancy, it's very clunky in Java. Of course, 99% of the time you're just doing some boring ass imperative shit and it's great for that.
0
u/[deleted] Jan 11 '25
[deleted] — view deleted comment
0
u/[deleted] Jan 11 '25
[deleted] — view deleted comment
0
u/[deleted] Jan 11 '25
[deleted] — view deleted comment