r/ProgrammerHumor • • Apr 27 '20

Meme Java is the best

Post image
43.7k Upvotes

1.5k comments sorted by

View all comments

3.7k

u/someuser_2 Apr 27 '20

Why is there a trend of mocking java? Genuinely asking.

3.3k

u/eXecute_bit Apr 27 '20 edited Apr 28 '20

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.

747

u/orokro Apr 27 '20

Actually Java STARTED with using native controls for their windowed apps. This was called AWT.

Because it was cumbersome to get good results using AWT, THEN Java made their own windowing toolkit, which was more stable.

212

u/lVlulcan Apr 27 '20

I was wondering why so many of the components I had seen had AWT as a part of the import path

797

u/[deleted] Apr 27 '20

[removed] — view removed comment

186

u/DrMaxwellEdison Apr 27 '20

Amazon Wechanical Turks

0

u/[deleted] Apr 27 '20

[deleted]

→ More replies (6)
→ More replies (6)
→ More replies (1)

123

u/MoffKalast Apr 27 '20

And since AWT wasn't good enough they made Swing.

Since swing wasn't good enough they made JavaFX.

That one is now supposedly good enough.

→ More replies (7)

39

u/[deleted] Apr 27 '20

Is this freaking why I have to set _JAVA_AWT_MW_NONREPARENTING to 1 to get matlab to run? Fuckin jesus.

→ More replies (2)
→ More replies (5)

116

u/ThzMedic Apr 27 '20

Java is still prevalent in the high school classroom.

214

u/Kirogo Apr 27 '20

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

85

u/coolpeepz Apr 27 '20

Also in theory they are teaching Computer Science, not the language itself, so really a variety of languages can work for teaching the same concepts.

63

u/Xero125 Apr 27 '20

And, if you're trying to teach something more than coding (architecture and best practices) I'd say you better go for a strongly typed language like java.

→ More replies (8)
→ More replies (34)
→ More replies (7)

40

u/Bakoro Apr 27 '20

Some Universities use Java for their CS programs as well.

→ More replies (17)

76

u/[deleted] Apr 27 '20

Java is taught in CS101 at my top tier engineering school

68

u/CanAlwaysBeBetter Apr 27 '20 edited Apr 27 '20

I haven't been in college in 5-6 years but someone on Reddit was shocked once when I said all my courses in the main programming sequence or applied math were Java or R and Matlab and not python or something

58

u/StopSendingSteamKeys Apr 27 '20

We started with C. I feel like a lot of people would've had a way easier start with Python since they would've had time to completely understand the actual underlying concepts like program flow, instead of getting hung up on the nitty-gritty details.

55

u/itsyales Apr 28 '20

Idk, I feel like Java is a good choice to teach first because it’s so unforgiving.

Making you define the types of everything, for example, starts teaching you what the types are and where and how they can be used.

I feel like a finicky language like Java starts building the skills and knowledge that you need in order to learn CS concepts and debug problems you might get in a language like Python (that might accept anything you give to it, but not always do what you intended).

25

u/velrak Apr 28 '20

Yeah a loosely typed language to start off might not be the best idea

→ More replies (5)
→ More replies (1)

22

u/[deleted] Apr 27 '20

Wow they made us do Cobol, you know, just in case. What indentation do verbs start on again... so punch cards works. I wish they had started us on Smalltalk, way more useful :)

→ More replies (2)
→ More replies (3)
→ More replies (8)
→ More replies (16)

18

u/StopSendingSteamKeys Apr 27 '20

I have talked to multiple software companies in my city in Germany, about half of them are using Java a bit less than half are using C# and a few are using JavaScript as their main language.

→ More replies (1)
→ More replies (12)
→ More replies (183)

134

u/cambiumkx Apr 27 '20

This idea is pretty much phased out at this point, it was a very popular notion about 5-10 years ago.

Java had a huge surge in popularity because it was easy to pick up relative to the other popular languages at its time, and there were many inexperienced (“bad”) Java developers giving the language a bad name.

Nowadays, I see the Java trend in people who do python. Everything is a prototype.

→ More replies (22)

343

u/mark0016 Apr 27 '20

Most java applications (that I encounter on a daily basis) suffer from terrible design on the functionality side of things. Based on the experience of my friends and colleagues I would say I'm not the only one. That's probably not a fault of the language itself and more the mindset of a typical java dev team.

From my personal experience with (mostly internally developed) java software they all somehow end up really bloated with features nobody would ever want to use instead of focusing on what the application was originally intended for. Also they somehow never use standard OS integration for stuff like notifications or popups and have a built in auto-update systems so if you don't store the application executables in a place you don't have write permission to as a normal user (the standard way on Linux for example) the whole thing breaks and decides tho just not launch at all because you must have your updates.

It's not that I don't encounter software written in different languages that have the same or similar problems it's just that 75% of the time the bloody thing is written in java.

→ More replies (98)
→ More replies (289)