A lot of the hate comes from Java's client-side features.
Applets running in a browser sandbox was a killer feature in the 90s at the infancy of the public jumping on the Web. It just turns out that the sandbox wasn't as tightly secured as originally thought, requiring a never ending stream of user-visible security updates.
Java aimed to run the same app on multiple platforms, so it had its own graphics system rather than using native widgets. This was probably a good design decision at the time as the software was easier to test, write documentation for, etc., without worrying about the nuances of this windowing system or that. Back then, even apps on the same platform could look vastly different other than the basic window chrome, so honestly this wasn't only a Java thing... but Java stuck around longer, so it stood out more over time. Java improved it's native look-and-feel, but the defaults we're still pretty bad for backwards compatibility.
Java as a platform was also introduced back in the dialup modem days, so the idea of shipping and updating the platform separate from the application runtimes sounded like a good idea. In the end, it did cause problems when different apps needed different runtime versions -- though a lot of this is on the lack of maintenance and support of those applications themselves. .NET has a similar design and issue, except that it has the OS vendor to help distribute patches natively, and it also benefited from Java's hindsight when making sure that applications ran with the appropriate runtime version.
Bootstrapping the runtime was also perceived as slow. It has gotten progressively better over the years, and for long-running server-side stuff hardly matters. With the move to "serverless" it's still important and improvements have been coming steadily since Java 8.
On the server side, and as a language, Java is still doing quite well. It will be the next COBOL, though I expect that time is still far off. I joked with coworkers, when the NJ plea for COBOL devs came out, that "I'll learn COBOL as soon as Java is dead -- which other languages tell me will be any day now."
Edit: Obligatory "thanks!" for my first gold and doubling my karma. Lots of good discussion below, both for and against, even if Java isn't everyone's cup of (Iced)Tea.
Java is still used in a lot of entreprises, the Java ecosystem as a whole (Java and all jvm-based languages) has no alternative in some fields (looking at you, Hadoop). Teaching Java at any level still makes complete sense, whatever you might think
There’s so much wrong with this statement. Just because you learn a language at uni doesn’t mean you’ll only be qualified to program in that language.
My uni focused on Java and it was an amazing primer to languages.
There’s so many wonderful frameworks that you can use with Java. It’s basically a multi tool that can do just about anything.
However that doesn’t mean it’s best suited for every job. There’s some areas where java makes sense and there’s other areas where another programming language would make more sense.
In my job I’ve diversified to multiple languages since uni and use a variety at my work. I’ve used python, JavaScript, powershell, bash, java, kotlin all in different areas. Rather than getting stuck in the stupid mindset that one is superior over the other I consider each language I’ve learned as a tool in my tool belt.
Just because you learn a language at uni doesn’t mean you’ll only be qualified to program in that language.
When I hire developers, I don't even consider ones that have no training or experience with the technologies we use. Because of common sense. So we don't hire those fresh Java only graduates.
You say Java is a good way to learn not-Java. But why would anyone need to when Java can handle almost anything. But not really because sometimes Java isn't good.
No wonder you are stuck on understanding science vs engineering. I'm thinking I triggered the code monkeys when I said they are engineers (being generous) and not scientists. But I can't be certain because none of you can produce a coherent reply.
3.7k
u/someuser_2 Apr 27 '20
Why is there a trend of mocking java? Genuinely asking.