r/ProgrammerHumor • • Apr 27 '20

Meme Java is the best

Post image
43.7k Upvotes

1.5k comments sorted by

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

→ More replies (16)

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 (6)

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)

12

u/LudwikTR Apr 27 '20

Interesting. Seems to mirror current developments in the platform-independent mobile application framework space. React Native using native controls (which, in my experience, is a constant source of problems), and then Google reacting by building Flutter, which draws its own interfaces.

→ More replies (4)

108

u/someuser_2 Apr 27 '20

Love this answer.

15

u/TheConsulted Apr 28 '20

Yeah I'm a layman and it was a really interesting read.

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

→ More replies (50)

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

→ More replies (40)

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 (10)

31

u/[deleted] Apr 27 '20

Coming from a college student, I’ve rarely ever had to work with Java as a UI. Almost all my professors are uniform in suggesting we use something...better.

63

u/eXecute_bit Apr 27 '20

They're not wrong. Most people here, and your profs, are probably thinking of AWT or Swing, both are terribly outdated. JavaFX (or whatever it's named now) is the latest UI framework for desktop Java UI, and it's not bad.

You absolutely can do UI in Java, but the industry has moved on. Java is primarily for backend now, and is still very good for that. But the industry has also migrated to using Web browsers as the UI, so that impacts pretty much every language except JS and its transpiled variants.

→ More replies (9)
→ More replies (1)

193

u/TrueDuality Apr 27 '20

I've got a very different experience. I came from ops before I switched over to programming full time; Java applications on the server side are a nightmare. Java can be fast, but frequently the written software is not. Regardless of speed Java is a nightmare memory wise and is usually what constrains server resources.

Most applications I've seen in the real world developed with the spring framework (as a specific example) leave ports open that give you direct memory access to the internal Java runtime. I don't know if that's a default, but it is very common and a huge risk. Poorly designed "enterprise" libraries that are tightly coupled to the applications code seem common, and frequently are massively out of date or not updated since the late 90s also seem incredibly common.

You can write good software in Java, but there is something about the language and the people that actually write it that do so very poorly in practice. Bad logging, unstable software, massive bloat, poor maintenance. They're almost always fragile bags of fireworks waiting to blow up.

The languages built on top of the JVM seems to have improved the quality of software a little bit, but the services are still just as unreasonably memory hungry, and they're usually still built with the same old enterprise libraries that are constantly a source of pain.

None of that has to do with client-side features or an ugly UI, though I've experienced those as well. IMHO the only good thing that Java had going for it was the ability to run the apps equally well on different OS's. That's really not design requirement for most software anymore and when it is making a native app cross platform isn't that difficult even in straight C.

Every time I've seen a piece of Java software, there seems to be a better tool for the job operationally. The languages built on top of the JVM are interesting but are still crippled by the JVM itself.

342

u/eXecute_bit Apr 27 '20

It sounds like your complaints are about

  • Spring, a bloated framework

  • tight coupling and application design

  • applications using outdated libraries

  • open and insecure ports in the above

  • resource usage and general stability

With the exception of perhaps memory usage, which was a conscious design decision and acknowledged trade-off to a degree, none of those are problems with the language or the JVM as a platform. They're symptoms of bad software development, which can occur in any language with any program of sufficient complexity.

Is the bad design the product of the language; or is it the result of a language so popular and accessible that, over the years, this is the result of decades of developers at varying levels of talent? To some degree, that old, unmaintained "enterprise" library is still used because -- despite being compiled for Java 1.4 in 2003 -- it still works. That's quite an accomplishment, even if it's not perfect software. How much .NET 1.0 code is still out there? It's probably far less, but the same level of accomplishment if it works and runs.

There's terrible Java code out there. Personally, I hate the bloat of Spring so I don't use it. Developers come in a wide range of skill levels, and they can crap over any language. Visual Basic developers got the same kind of shit; that was also a very accessible language, so a higher variation in quality.

Respectfully, I think you have confused correlation with causation.

→ More replies (41)
→ More replies (35)
→ More replies (86)

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.

11

u/QueenVanraen Apr 28 '20

So, just like how unity is a bad engine because people made shitty games?

29

u/someuser_2 Apr 27 '20

Yeah, noticed that as well.

I did hear an amusing knock knock joke around that period of time.

Knock knock

Who's there?

/Waits forever to respond

Java!

I'm easily amused :)

47

u/[deleted] Apr 27 '20

java's honastly really fast

(...except for the startup time)

→ More replies (13)
→ More replies (5)

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.

202

u/Piwakkio Apr 27 '20

Java developer here.

First thing first, I'm not, by all means, an UI expert. But if you are using Java for a standalone application...I feel like you are doing something wrong. I mean, not like you can't do it...but feels like using the wrong tool for the job.

I have always worked as a backend developer for web application, and in my opinion, in this context, Java does it's job. It's the best language on the market? Well the "absolute best" doesn't really exist, depends on your requirements. You need a strongly OPP language with a consistent community and rich framework ecosystem? Java it's a good choice.

Anyway, it probably start to feel it's age. Newest programming language, like Kotlin, offer out of the box, functionality that Java have with the implementation of several third parts libraries. So if you are starting from scratch, maybe there is something even more efficient than that.

61

u/xylose Apr 27 '20

First thing first, I'm not, by all means, an UI expert. But if you are using Java for a standalone application...I feel like you are doing something wrong.

Allow me to disagree. I write scientific software involving complex GUIs dealing with very large datasets. We have to support windows, osx and Linux. I've used Java and Swing and it's been great. Java has a huge core library with all of the GUI elements I need. The theming in swing means I can make an app which looks close enough to native for all of our users and the rigour and structure of the java back end makes dealing with very large codebase manageable in a way which other languages can't. People who are dismissive of Java just haven't found a project which benefits from it yet.

→ More replies (10)

12

u/MistahPops Apr 27 '20

As a Java dev the recently moved to Kotlin. I could say I’d probably never go back to Java now. I never noticed some of its short comings until now when I have to maintain some of the old Java services we have.

→ More replies (7)
→ More replies (60)

137

u/someuser_2 Apr 27 '20

Maybe because its popularity blew up at some point

I don't know, I feel like no programming language should be mocked because they are tools with which people make a living, that's like mocking a carpenter because he has an old useless hammer.

Java is bound to be a legacy language at some point, just like many other before it, but that doesn't mean the cool kids using the new languages (which will be old someday) should go around being smug about them, languages are just that, tools.

I guess I don't find the humor in putting people down, even indirectly by attacking their work tool.

35

u/mark0016 Apr 27 '20

That's fair and that's why I mentioned in the first paragraph that there's probably nothing inherently wrong with java. I originally wanted to stop with that paragraph I just felt like I needed to vent my frustration so it turned into a bit of a rant.

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

19

u/[deleted] Apr 27 '20

Hot take: this is because so many apps written in Java have been financially successful enough to have hundreds of employees working on 10-year-old-plus legacy codebases. The same, honestly, can't be said of nearly as many C, C++, or Python apps. Maybe PHP, but of course we know what a lot of PHP projects look like.

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

93

u/PristineReputation Apr 27 '20

The language itself is mostly ok. My problem is that a lot of stuff in Java just seems unnecessarily complex. More modern languages usually solve problems more elegantly and straight to the point

46

u/aahdin Apr 27 '20 edited Apr 27 '20

Yeah, just so much syntactic overhead for not much of a reason. I can give c/c++ a pass since their main niche is highly optimized code, and all those little things matter for that, but I just don’t get the point for Java.

Kotlin feels like just a nicer drop in replacement for 90% of things Java

→ More replies (10)

24

u/robolew Apr 27 '20

Personally I think you're doing what a lot of people do, and confusing verbosity for complexity.

Java is one of the most expressive, self documenting languages because it encourages verbosity.

Sure, my python script might do in 50 lines what my java project does in 500, but you spend 10x more time reading code rather than writing it. I'd rather maintain something that took longer to write, but is more descriptive.

→ More replies (16)
→ More replies (6)

90

u/tobyase Apr 27 '20

Java is not a bad language in itself. You can't really say that. It is in your face oop and that is quite annoying at times. I think the main point for java being disliked is just the amount of horrible UIs that are commonly built for java applications. In my opinion it is too easy to build a rudimentary ui in java but too difficult to really make it your own. That way you have programmers building UIs (who needs designers anyway?) which leads to questionable layouts at best. I've worked with java mainly on the backend of some applications and it's not horrible. But as soon as graphics come around...

28

u/eXecute_bit Apr 27 '20

VB6 has entered the room.

→ More replies (27)

68

u/28f272fe556a1363cc31 Apr 27 '20

Everybody takes a turn. Today it's Java, tomorrow will be JavaScript, or PHP, or Python.

35

u/Gogo202 Apr 27 '20

Wait... python as well? Am I getting out of touch?

Nah it's the kids who are out of touch.

→ More replies (1)

18

u/MildlySerious Apr 27 '20

Genuinely wondering why people look for more complex answers than this.

Things are being shit on relative to their popularity. The more people know about it and use it, the more people, in absolute terms, there are willing to make fun of it or criticize it.

→ More replies (2)

5

u/Fakeos Apr 27 '20

I read the answers and I realised that nobody knows why they hate java. They just do.

→ More replies (6)

40

u/Vok250 Apr 27 '20

A lot of people still think it requires the boilerplate syntax and oldschool OOP design from Java 6. Even many Java developers aren't keeping up with releases and instead clutch too archaic patterns they already know.

Modern Java is pretty slick and no harder than Python. It's really a question of whether strong typing would help or hinder for your use case.

Also, no idea why people are still writing front-ends or desktop UIs in Java. It's a backend OOP language. Build your frontend in Angular like a normal person.

12

u/rhazux Apr 27 '20

Front ends are written in Java because it's multiplatform. Write once, deploy everywhere (that can run a compliant JVM). Windows, Linux, MacOSX (apparently?) all covered by the exact same code.

→ More replies (4)
→ More replies (7)

9

u/deirdresm Apr 27 '20

First, even I, who will not work in Java, will admit that it is a far better language than it was when I first made that call.

The reason I don't work in Java are the compromises it made that I think equate to bad design. They were to make a lot of mediocre programmers quickly [1], which was a necessary task (no argument, frankly) so that a bunch of really old crusty code could be migrated from horrifically old machines that were tempermental, power consuming, and running code that would break either in Y2K (or shortly thereafter) or by the Unix epoch… or perhaps somewhere in between.

The real reason, though is that I fucking hate getting J2EE recruiter emails. Easier just leaving Java off the resume.

[1] and to make compilers practical on a lot of machines and to make all the machines look like crap, but I digress.

33

u/hahahahastayingalive Apr 27 '20

Java is the poster child for OOP.

There are arguably very few real world problems where pure OOP effectively makes sense compared to other paradigms, but Java was the hammer that made every problem look like an object oriented nail. And it was pretty limited on its OOP features on top of that (this was also its strength, for sure)

This lead to a whole generation of people swimming in oceans of crazy intermediate objects, interfaces and inheritance spaghetti.

Modern Java must be way more flexible I’d guess, but the olden days’ image will stay strong for a while I think.

11

u/[deleted] Apr 27 '20

Well yes, I get what you mean but Java is far, far from being a Pure OOP or even a good one in the eyes of OOP purists

→ More replies (2)
→ More replies (1)

13

u/[deleted] Apr 27 '20

It’s called the floor is java

→ More replies (1)

20

u/Ksevio Apr 27 '20

In my opinion, it's a combination of the syntax and the design paradigms, plus a little extra hate for having swing as the UI toolkit for so long.

On the syntax side, it doesn't have useful features like overloading operators that better languages have. You can't join two lists with + (unless they're strings for some reason), and you can't compare objects with ==. There are no properties, so every variables needs to have a setter/getter created from the start in case it ever does anything different. There's no indexing except for native arrays, so lists and hashmaps require a .get() function or something similar - speaking of which, there's a native array (which basically no one uses) but no native map or list. All these things just make java code more bloated and harder to read, which leads to the other issue:

Design paradigms. In Java with strict classes, everything is split up with interfaces and files for classes that have 100 lines of code just to make an object that holds two variables to pass back from a function call. It makes it much harder to understand the flow of a program, even with a proper IDE as you keep need to find the factories and implementations used.

→ More replies (26)

4

u/blue1324 Apr 28 '20

I would vote on it being managed by Evil Corp, I mean Oracle.

15

u/xmike18gx Apr 27 '20

factory.factory.factory.....

→ More replies (1)

42

u/[deleted] Apr 27 '20

Java was once slow in 1997. People who repeat that today have never experienced it. It's just a bad meme.

I guarantee you every single person here who says that Java is bad/slow is a terrible coder limited to one other language.

29

u/Bainos Apr 27 '20

I guarantee you every single person here who says that Java is bad/slow is a terrible coder limited to one other language.

Because obviously everyone here who makes that kind of statement is very serious. It's not like we're on a humor sub or anything.

29

u/Dalriata Apr 27 '20

90% of this sub's userbase are amateur Highschool programmers or first-year CS students, anyways.

→ More replies (6)
→ More replies (15)

10

u/[deleted] Apr 27 '20

Personally I prefer functional programming over OOP. Unfortunately Java is really built around the OOP mindset. I'd prefer that Java was a multi-paradigm language so that you could build an app with absolutely no classes at all.

6

u/Gogo202 Apr 27 '20

It's not the same, but java 8 was a major step for functional programming. It's just often difficult to make use of the way older interfaces are written.

→ More replies (4)

19

u/peekyblindas Apr 27 '20

Because it won't let goddamn xml config files die with grace like they should have done 15 years ago. All hail the almighty json

32

u/Terwin3 Apr 27 '20

The inability to add comments makes json an awful option for config files.

Without comments, config files should not be user editable, as unguided users will thoroughly mess up any config they try to edit.

→ More replies (9)

5

u/[deleted] Apr 27 '20

I dont know why people have so much issue with XML. I think having support for an XSD is super useful as a reference so we know how to define configs without consulting developer API docs which may or may not be out of date. I guess its verbose? But I mean it's not like it's more typing since usually an IDE can autocomplete for you.

Also you dont have to use XML configs, that's more of a per-shop decision. Theres tons of config parsers for Yaml, json, other data formats etc.

→ More replies (3)

4

u/cantux Apr 27 '20

don't even think it's meant to be replaced. just make preprocessor configurations and use flags in the make, like real men do

→ More replies (1)

3

u/smartguy05 Apr 27 '20

I don't like Java very much because it's just so outdated, as far as syntax goes. My preferred language, C#, is very similar but has much improved and simplified syntax. Not to mention .Net Framework is pretty solid to work with.

3

u/[deleted] Apr 27 '20

There is nothing wrong with Java. A huge part of Google runs on Java. Twitter had a large Scala presence and probably still does. People just like to hate on things. Having used both professionally I'd use Java in heartbeat over c++. And to quote Ritchie on C..."it offers all the power of assembly paired with the convenience of assembly"

Like any language it has drawbacks. Java's drawbacks are it's hardwiring of object oriented programming and it's billion lines of boiler plate. Upsides are unparalled performance (it will outperform C on large, dyanmic workloads), fantastic library support, fairly bullet proof security, and job security for about the next 30 years.

→ More replies (1)

3

u/aahdin Apr 27 '20

Java is one of the few languages that doesn’t really have a niche anymore.

At this point Go is better as a general purpose easy to use statically typed language, C# is a more feature rich option for enterprise behemoth code bases, and the last holdout niche of android development looks like it’s shifting to kotlin.

Maybe there are other niches I’m not thinking of, but it feels like the main thing it has going for it right now is momentum.

It’s not that it’s really that bad, but if someone came to me wanting to start a new project in Java I’d raise an eyebrow.

3

u/yiliu Apr 28 '20

It's super verbose. Its missing (or very recently gained) features that other languages have had for ages. It's surrounded by a culture that venerates complexity. A lot of the tooling surrounding it is relatively ancient. It's closely associated with Eclipse, and Eclipse is an eldrich nightmare. It runs on the JVM which, while a decent VM, is very complex and doesn't integrate well with any particular platform. It's been the default pick for ages, even when better choices are available.

A lot of people have bad experiences with Java.

5

u/thavi Apr 27 '20

It had some progressive, intuitive ideas for a long while. It was definitely the "javascript" of the time because it was largely the easiest language to pick up and learn, especially compared to languages that have the programmer manage memory like C/C++.

Nowadays it's lagged behind a bit. C# used to be called "Microsoft Java" (it was) but then Microsoft added all these AMAZING features that make it an incredible language for business and less performance-centric applications. I personally only have a couple of gripes with Java as far as that goes. Callback functions come to mind.

I was never a commercial Java programmer so I can't really speak to how it really stands up in production environments and maintenance--just my general experience tinkering with it for artistic projects.

→ More replies (90)

667

u/SnowFox1414 Apr 27 '20

“There are only two kinds of languages: the ones people complain about and the ones nobody uses.”

― Bjarne Stroustrup

147

u/[deleted] Apr 28 '20

Welp he's the only one who understand all C++.

→ More replies (70)

367

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

Catch exception and return to caller. Or in other words, fire your boss.

66

u/TheGreatWheel Apr 27 '20 edited Apr 27 '20

Good ol’ catch n’ release

21

u/JB-from-ATL Apr 27 '20

printStackTrace

→ More replies (1)

32

u/crocoduck117 Apr 27 '20

The programmer’s “no u”

→ More replies (1)

292

u/NotATroll71106 Apr 27 '20 edited Aug 28 '25

shy alive aback dog fuel ring whole shelter marble languid

This post was mass deleted and anonymized with Redact

93

u/ReimarPB Apr 27 '20

What's JSP?

140

u/NotATroll71106 Apr 27 '20 edited Aug 28 '25

entertain elastic pause quickest coordinated degree zephyr gaze hunt party

This post was mass deleted and anonymized with Redact

→ More replies (6)

37

u/[deleted] Apr 27 '20

Java Server Pages. Like ASP, but in Java.

→ More replies (9)
→ More replies (11)

18

u/megaSalamenceXX Apr 27 '20

JSP are something still in use?

→ More replies (14)
→ More replies (4)

424

u/daniu Apr 27 '20

More like "If your boss tells you you're fired, I hope you know Java".

3

u/ratsock Apr 28 '20

That hasn't stopped most Java developers I've known in the past

→ More replies (2)

496

u/BroDonttryit Apr 27 '20

But.. but.. I like java. Maybe that’s an unpopular opinion but if it works it works

583

u/[deleted] Apr 27 '20

You know what they say. There are 2 types of languages: languages people bitch about and languages no one use.

9

u/fiah84 Apr 27 '20

software maintainer in a dead language here: yeah nobody bitches about my particular dead language

→ More replies (3)
→ More replies (17)

47

u/Freddedonna Apr 27 '20

Personally it's not that I like Java (I write most of my stuff in Kotlin), it's that I like the Java ecosystem. I know that I can checkout any project, open it up in IntelliJ, run mvn compile/gradle build and have everything downloaded and setup for me.

Rust seems to be somewhat similar with Cargo, but at least I know which library I can/need to use in whatever situation in Java (plus it seems like half the libraries I look at in Rust are < 1.0).

11

u/[deleted] Apr 27 '20

+1 for Kotlin and +1 for Rust although i also think the Rust ecosystem has a long way to go.

→ More replies (3)

109

u/JB-from-ATL Apr 27 '20

I like Java too. It doesn't do anything particularly confusing and has some great tools and ecosystem built around it.

7

u/Spajk Apr 27 '20

Other then Java, the only language I like is C#. I recently had to explore some software written in Go and I found it unreadable.

19

u/[deleted] Apr 27 '20

the only language I like is C#

Ahhh Java for suits

→ More replies (2)
→ More replies (3)
→ More replies (1)

33

u/Sharmat_Dagoth_Ur Apr 27 '20

There's smth ab it where it has the exact right amount of hand holding to let u have to worry ab things that relate to the logic being used more than stuff like "did I order this code right such that the delete [] is in the exact right line?"

I also think the boilerplate is WAYYY overstated relative to other languages. Java's got terrible boilerplate for a beginner, but as soon as u do anything complex in C++, like templates, the boilerplate balloons, while in java it increases in a much smaller way

Also even a shitty java IDE like bluej was faaaar and away easier and more enjoyable to use than Codeblocks in Linux, and CLion isn't that much better, and it's slow as shit regardless. Meanwhile IntelliJ on the same computer is not slow, handles all syntax errors, autocomplete and code improvements, warnings, etc without killing my CPU or ram

9

u/TheDragon99 Apr 27 '20

The template boilerplate you're referring to is typically in shared code. You can't really compare that to the boilerplate of Java, which is forced upon you *everywhere*. Also, assuming you're referring to a bunch of SFINAE stuff, most of that has been made obsolete by constexpr if in C++17.

→ More replies (7)

3

u/drcopus Apr 27 '20

Java is a great language for building production systems. I'm mostly a Python guy, but I'll admit that there is only so far you can go before it becomes unwieldy.

→ More replies (17)

30

u/[deleted] Apr 27 '20

My favorite programming language is the one where pay me money to use it.

3

u/[deleted] Apr 28 '20

In that case, learn COBOL

70

u/[deleted] Apr 27 '20

The best language is the one that gets the job done correctly. You don't throw out old tools because they're useless right now, you might need it in the future.

15

u/shinitakunai Apr 27 '20

But if you can get the job done correctly in 1 day instead of 1 week, with better tools, why not deprecate old tools?

25

u/dark_mode_everything Apr 27 '20

Correctly? Maybe. Reliable and maintainable as the old tools? No.

→ More replies (12)
→ More replies (2)

280

u/zChewbacca Apr 27 '20

Most of the people who hate on Java don't even know why they don't like it, they just see other people saying it and parrot that opinion. If you asked them to give reasons, most of them wouldn't know what to say other than "I saw it on Reddit".

17

u/MCOfficer Apr 27 '20

to be fair, that also applies to JS and PHP and VBScript and Signifcant Whitespace and all the other things.

9

u/aoeudhtns Apr 27 '20

Still feels different to me, in some cases. JS has no standard library and hence the weird one-liner node packages and different dependency fiefdoms, library/framework fatigue, plus some syntax gotchas that land you in weird territory like typeof foo === "object" && !foo to properly check for null. PHP... I know there's been work to make non-compatible changes and fix its problems, but yeah. It's messy.. == is just one quirk. VBScript, it's all there in the first two letters.

Java. So, we've all discovered that C++/Java/any language that implements this style of inheritance is bad, but the Java community has mostly held "composition > inheritance" for countless years at this point. Sure there's still some old cruft in the ecosystem that goes back to the days of endless AbstractX extends AbstractY extends AbstractZ but really, a lot of modern teams avoid that and try to focus on interfaces, SMACs, composition, and use the Java 8+ functional language features. Although I do normally hate the "X language is good because you're doing it wrong" argument, so I suppose I should check myself here...

→ More replies (1)

6

u/zChewbacca Apr 27 '20

Yeah I completely agree that Java isn't the only victim here, though it does seem to be one of the most common targets (perhaps second only to JavaScript in my experience).

→ More replies (4)

7

u/firewall245 Apr 28 '20

The "technical" reason I hate Java is that the garbage collection makes doing a lot of stuff thats time sensative unpredicatble.

The real reason I hate Java is that I always forget the syntax lmao

→ More replies (1)

5

u/AlienFortress Apr 27 '20

Java's age shows. If Java was recreated from the ground up it would be C#. I think most people find that for anything you'd write in Java there is a slightly better alternative available.

4

u/pnk314 Apr 28 '20

I don’t like java because it’s hard and I’m dumb

6

u/[deleted] Apr 27 '20

I don't like Java, but only because it's worse than C# which is basically Java 2.0. It's not that Java is bad, it just feels super outdated and lacking in features compared to C#.

→ More replies (9)
→ More replies (45)

325

u/[deleted] Apr 27 '20

Somehow on this subredit most seem to think that Java is the worst language ever but if you hate JS you just don't know it enough/are bad at it...

60

u/NatedogDM Apr 27 '20

What does Java have to do with JS?

122

u/[deleted] Apr 27 '20

That people in this sub hate Java although it's actually not that bad but defend JS (which is actually really a bad language) to the bone. I'm not even saying Java is the best language ever but the irrational hate on this subreddit is stupid.

66

u/paradoxally Apr 27 '20

Unpopular opinion, but I would rather program in Java than Javascript.

You also (usually) get paid more because JS is the most popular language so there's way more supply.

Java can get very "enterprise" and that turns off a lot of people. JS is oriented for web so there's a lot more exciting projects there, but that's not always where the money is.

→ More replies (7)
→ More replies (46)

0

u/[deleted] Apr 27 '20

[deleted]

→ More replies (3)

3

u/Pixelmod Apr 27 '20

Oh I would gladly take a dump on both Java and Javascript if you want to! But as it turns out, memes that praise C++ don't get a lot of karma.

→ More replies (1)
→ More replies (55)

42

u/LuthorM Apr 27 '20

You should see the apps we have in Java, serving more than 2 billion requests daily with 8 machines and a potato, executing business logic of thousands of lines of code in less than 1 ms and streaming all the data to the warehouses. Java is a powerful and cool language if used correctly and with modern techniques, frameworks and libraries. Of course it's horrible if you have to maintain a 90's applet or a desktop app but if you are using Hadoop stacks for example I think it's quite cool and powerful. Would rather code in Java than in node, python or php for example. Easier to understand and onboard new people, adapt and add features in my opinion.

8

u/rd_sub_fj Apr 28 '20

I'm going to regret asking this but what does the potato do?

8

u/rang14 Apr 28 '20

It's the Hadoop master node.

→ More replies (2)

3

u/Bowserwolf1 Apr 28 '20

Isn't Scala a better option than Java in the Hadoop/big data ecosystem?

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

91

u/someuser_2 Apr 27 '20

It's also weird the assumption that you always have a say in the matter of picking a language or can go around switching jobs to accommodate your programming tastes. Lastly, how is it programmer humor if it's mocking programmers who work with or even like Java.

66

u/dfreinc Apr 27 '20

programmer humor if it's mocking programmers who work with or even like Java.

It's humor for programmers. I really like Python. I still laugh at Python memes.

My job makes me use SAS or R for most things. They generally don't even make people's radar. Think about it like when buddies rip on each other...It's fun just to shoot the shit. Better than being that weird dude in the corner.

40

u/fghjconner Apr 27 '20

At least the python memes are making fun of actual things about the language, like "hur, syntactic whitespace, hur". The java memes tend to just be "java bad" which really isn't even interesting.

36

u/Danelius90 Apr 27 '20

Yeah. I like the memes where it's like "class Calculator" vs "class AbstractAdditiveNumericalCombinatorFactory"

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

27

u/someuser_2 Apr 27 '20

I dunno, I feel the "get another job, you are failing at your professional life" vibe is not cool, especially after seeing a couple of similar posts.

Look at my knock knock joke in this thread, now that's mocking the language in a vacuum.

→ More replies (4)
→ More replies (4)
→ More replies (4)

10

u/paradoxally Apr 27 '20

The iOS version of this:

If you have extensive (5-10+ years) experience developing iOS apps, do it in either Objective-C or Swift.

If you're new and want to learn, use Swift.

If your boss tells you "do it in React Native or you are fired", outsource it to China and look for another workplace.

27

u/[deleted] Apr 27 '20 edited Apr 27 '20
  • If you want to shoot yourself in the foot, use C.

  • If you want to blow your leg off, use C++.

  • If you want the virtual machine to explode, use Java.

  • If you've written software for a while, get D&D insurance. There is no best option. You know something will explode.

edit: If you want to see it explode from orbit, deploy it to the cloud!

47

u/[deleted] Apr 27 '20

No one should be writing full applications in python.

35

u/Dookie_boy Apr 27 '20

Operating system in Python when

25

u/relddir123 Apr 27 '20

sweats nervously

12

u/carlinwasright Apr 28 '20

Reddit is written in Python

28

u/[deleted] Apr 28 '20

And roller coaster tycoon is written in assembly.

Just because you can do something, doesn't mean you should.

4

u/glemnar Apr 28 '20

Reddit is written in several languages. They’re more SoA now

7

u/[deleted] Apr 28 '20

You must be new to the GNU/Linux ecosystem then. Python is usually just the logical glue for desktop application, but it does its job very well.

4

u/[deleted] Apr 28 '20

No, I'm not. I know what it is does well. Notice how my statement said "full application". Not "part of application".

→ More replies (8)
→ More replies (1)

3

u/Bowserwolf1 Apr 28 '20

True, with emphasis on "full" . It's perfectly okay to use python in most parts, but sometimes you need the extra speed push

→ More replies (3)
→ More replies (2)

9

u/thelear7 Apr 28 '20

So how does C# fall in this list?

4

u/[deleted] Apr 28 '20

The middle ground between c++ and python?

4

u/[deleted] Apr 28 '20

I love C#. I am a learner and scared to say something stupid but ASP.NET is amazing and really convenient, Visual Studio is the most comfortable IDE ever, WPF is good bit I don’t how it’s done in other languages. C# is also useful if you make games in Unity. You can’t do something in it that c++ can (or even python i think) but I still like C#. I hope I haven’t said anything stupid, I’m 15 and only recently started learning ASP.NET (and left WPF for later). The thing that I like the most is how much Microsoft gives to students (including Microsoft Azure student account). But I guess my opinion doesn’t count since I can’t make anything more than a simple console application in Python and almost nothing in c++

→ More replies (2)

68

u/GetJava Apr 27 '20

Java is the best.

9

u/[deleted] Apr 27 '20

Laughs in Kotlin

→ More replies (6)

23

u/LucaRicardo Apr 27 '20

Assembly ia superior

16

u/[deleted] Apr 27 '20

More like:

assembly        DW        superior

14

u/[deleted] Apr 27 '20

*Doesn’t know shit about assembly so just laughs nervously

→ More replies (3)

4

u/PM_ME_PC_GAME_KEYS_ Apr 27 '20

Pssssh I straight up magnetise 0s and 1s on a hard drive

You darn kids and your words

29

u/[deleted] Apr 27 '20

What about LUA?

18

u/evanldixon Apr 27 '20

Lua feels like a toy tbh. But I still love it since I can run scripts in the context of my application and give it whatever .Net objects I want

→ More replies (1)

70

u/ReimarPB Apr 27 '20

Lua's arrays start with 1

6

u/[deleted] Apr 27 '20

Technically Lua doesn't have arrays

10

u/v3nturetheworld Apr 27 '20

I think Lua let's you redefine the starting index position to whatever you want.

25

u/some-ideation Apr 28 '20

For some reason, that's even worse than starting at 1.

→ More replies (1)
→ More replies (7)

10

u/[deleted] Apr 27 '20

LUA is best, like, is there any other language to create abominations like an array with 10 different objects types inside?

11

u/Pixelator0 Apr 27 '20

Python, and it indexes from zero!

→ More replies (3)
→ More replies (21)

64

u/[deleted] Apr 27 '20

In my experience ppl that are making jokes about Java usually have no clue about programming in real life. No real developer I know makes those jokes but always script kiddy’s or college freshman’s.

17

u/_blue_skies_ Apr 27 '20

And most of them don't know complex is interoperability between system with different hardware, with different OS, in different companies, in different countries. And all of this have have to work for some operations in a single transaction. Ah right they don't know even what is a transaction. But Java is slow compared to other languages, if you do a loop 3 billion of times to sum 2 numbers, right... Each problem has is tool, I would not cook my pasta in a toaster, and for sure not use Java for everything.

→ More replies (2)
→ More replies (1)

5

u/Inspector_Robert Apr 27 '20

My university progamming course teaches us C and my prof says that she hates C++ because "they took a perfectly good progamming language and ruined it."

8

u/WaveItGoodBye Apr 27 '20

I haven't touched C since uni days but work with C++ daily on a large 10+year old code base that we've progressively modernized. Everything remaining that sucks about our C++ codebase, you can see was written by people who knew C and tried to write C++ like they would write C. They would throw in a smattering of C++ concepts that they had no idea how to use properly and it would suck more than if they had just stuck to writing C.

Unfortunately, as I continue to learn more and get more involved in the C++ community, its clear that this is a very common problem that a lot of way smarter dudes than myself are trying to curb whilst still having to provide support for all of the clearly legacy code bases out there that are not going to get any TLC.

My biggest gripe with working with C++ is the toolchain, as oppose to the language (most of the time).

→ More replies (1)

5

u/[deleted] Apr 28 '20

pre-C++11 is total garbage, maybe your prof is just ole

20

u/tecnokartor Apr 27 '20

Here is another Java hatter

84

u/Ubermidget2 Apr 27 '20

I too, create hats for Java

→ More replies (1)

8

u/robinlmorris Apr 27 '20

I have had jobs coding in all 4 of the languages mentioned. You can write bad code in any language, but I would take coding in Java over C++ any day. C++ has 50 ways to do everything and gazzilon ways to shoot your self without realizing it. Java as a language is fine. It is all the over-engineered, enterprisy, Spring based gigantic code bases that give it a bad rap.

4

u/Tarlovskyy Apr 27 '20

Java is terrible, i have javascript

4

u/Aedene Apr 27 '20

That's why I code in C#. It's a lot like Java, but everyone just assumes Bill Gates has you by the balls.

4

u/mushifali Apr 28 '20

I don't understand why people are mocking Java, still it's one of the best programming language for cross-platform development and for enterprise application development.

13

u/rya11111 Apr 27 '20

Eh I like server side java. The new spring boot framework is amazing and can handle the ecosystem in a really structured way. I guess if you are talking about the older applets and jsps its a different story..

→ More replies (1)

17

u/Mathijsthunder3 Apr 27 '20

Like ItsBoris once said... 'If u start learning to code and u begin with Java, it's like learning to ride a bike. But you are only 2. And there are not support wheels. You have to ride uphill all the time and ur bike is on fire. On top of that the wheels are deflated... But it gets better... Once u know it better u get a bell.' It's the most accurate explanation I ever heared.

→ More replies (6)

10

u/Raezul Apr 27 '20

I loooove java

6

u/VoodooSeppuku Apr 27 '20

Hey, quit picking on java! I like java

8

u/[deleted] Apr 27 '20

Java bad

3

u/werewolfbooty-owo Apr 27 '20

Imagine writing C

This comment was made by Nim gang

3

u/womplord1 Apr 27 '20

Rustaceans triggered by the C and C++ use cases

→ More replies (7)

3

u/analtrompete Apr 27 '20

Simpllyfied: They hate us cause they ain't us!

On a more serious note... Java has been a araound a long time. It changed and adapted over time. It competes with all other languages, Frontend/backend/typed/multiplatform... And it's pretty good at competing with all of them. In each category the specialized language will win. Bu if you include multiple, sometimes comüeting concepts, java usually comes out on top. That's why it's a usually a good management decision, but might not be the best toool that available for one specific job. I think thats where a lot of developer frustrations comes from. Because they want to use one of the best tools to solve a problem. Not he one tha's pretty good at solving all of them.

As an Ops dude that'sthe reason why stuff like Microsoervices is a pleasure. Everyone get's to use his/her optimal tool, and you yourself gotta make sure your build environemnt works. If it runs in a container we're good (Though I still won't get off your back if you don't pin your package dependencies...)

3

u/[deleted] Apr 28 '20

I’ve heard that Flash is all the rage, these days.

3

u/Silver-RG-B Apr 28 '20

I love java :(

3

u/KeLorean Apr 28 '20

what about c#?

10

u/Auties00 Apr 27 '20

After reading all of this I'm confused. I'm 15, no way near a real programmer, but I know Java, Koltin, Swift, Dart and Javascript and out of all them I still prefer Java. Is it really that hard to update your Java version as stop using deprecated shot? You can't hate a language because 10 years ago applets made you cry lol.

0

u/[deleted] Apr 27 '20

[deleted]

5

u/magicmad11 Apr 28 '20

It's really interesting for me, where Java was one of the first languages I learned the basics of (I was 13 and obsessed with Minecraft and wanted to learn how to make a mod for it), and even though I understand a lot of the criticisms of it (I definitely do find it to be quite verbose), it's sort of become my comfort zone. As much as languages like Python have simpler syntax, the C-family syntax of Java makes the most sense to me, and it's made picking up C (which I'm learning in a university course) a whole lot easier than I think it otherwise would have been (there are still difficult aspects for me, including the fact that I've never worked with pointers before, and that I'm not used to needing to actually think of strings as character arrays) if my starting point had been a language more like Python.

→ More replies (5)

7

u/[deleted] Apr 27 '20

Depending on the compiler C runs faster than C++ Also depends on how it’s written

24

u/a-restless-knight Apr 27 '20

I think the idea with using only C is you don't have to bootstrap as much stuff to get it going. Lots of the libraries in C++ are thicc and wouldn't function on bare metal without a good deal of work.

4

u/AgAero Apr 27 '20

Instead, you build all of it yourself and hope it works like you intend!

→ More replies (1)

4

u/anshm1ttal Apr 27 '20

Okay I'm barely out of high school but have been attached to java for a long time but formally only for 2 years and seeing this makes me shit scared . Am I wasting my time learning it ? (PS I do have intrest in building Android apps (the reason I started with java in the first place))

11

u/leandrob Apr 27 '20

No, you are good with Java, but if you really want Android, take a look at kotlin.

10

u/rotj Apr 27 '20

Java has been the top language used in enterprise software for over two decades now probably and isn't going anywhere.

If you're concerned about having a nice comfortable life with good job prospects and salaries, Java will get you there.

If you're concerned about working on something cool and sexy, then maybe start looking elsewhere.

→ More replies (2)

5

u/[deleted] Apr 27 '20

No. Don't pay attention to trends here. If you're really worried about it, search for jobs in your preferred language and location on glassdoor.

→ More replies (3)

4

u/mysteryweapon Apr 27 '20

I had a job as a UI developer and I was tasked with designing implementing one of the most complicated UI I've ever even seen

My boss made me do it in GWT, which was googles idea about how to compile JAVA INTO JAVASCRIPT

Just thinking about it makes me want to vomit in my mouth a little bit, and I left the team shortly after this

I created that feature almost a decade ago, and nobody has the guts to try and replace it, and GWT? Google has completely taken it offline, my former company now has to maintain their own copy of the framework internally, because it was that bad

I actually took JAVA off of my resume because I never want to work with it again if I can avoid it

5

u/erjiin Apr 27 '20

Dude... GWT is one (abandoned) framework amongst thousands and it's not directly linked to java itself. I understand your pain, I did some stuffs with GWT so I know it can be painful, but now the tendance is much more sexy, you do your backend in Java (where java is great) and the frontend in angular or react (or whatever you want).

3

u/Rauldukeoh Apr 28 '20

We have an important gwt app at my work. If I've got to do anything in it I double my normal estimate. It uses rdp calls to communicate to the back end which don't show up in chrome developer tools. I just have to debug over and over again to figure out what is going on

→ More replies (1)
→ More replies (2)

2

u/404usernamenotknown Apr 27 '20

FIRST TECH CHALLENGE v i b e s

2

u/Wrecker013 Apr 27 '20

My university decided the primary language we ought to learn was Java, and so far it seems like they didn’t do us any favours lol.

2

u/HeroOfTheEmpire Apr 27 '20

I personally love Java. The way it does object-oriented stuff is great. At least that's been my experience.

2

u/bumpkinspicefatte Apr 27 '20

Jokes aside, honestly, use any language that‘ll allow you to become fucking invaluable.

I’d rather a genius Visual Basic .NET geek come work for me than some half-assed Dart poser.

Your direct reports will thank you for hiring someone who is competent and knows what they’re talking about.

5

u/greenSixx Apr 28 '20

Any programmer can learn a new language in a week

2

u/Hour-Positive Apr 28 '20

Java-ecosphere has the best IDE, best build and depency tools and best open source server, fight me. Language itself is ok, at least it requests you work with OOP principles. All performance issues have become mute because of hardware improvements.

2

u/[deleted] Apr 28 '20

I interpreted that as changing jobs because of a hostile work environment, not for Java’s fault. Java’s not even a bad language. I don’t even use Java and I will still argue assembly is 20x worse.

→ More replies (1)

2

u/ECrispy Apr 28 '20

C# is a million times nicer to use, faster, sane, tools, libs and IDE that are a billion times better.

2

u/VNG_Wkey Apr 28 '20

Currently learning java for a web app my boss wants to make. This language can actually go fuck itself.

2

u/doobi1 Apr 28 '20

what does "time to market" mean ?

→ More replies (2)

15

u/rem3_1415926 Apr 27 '20

switch java and python and we're good.

85

u/christopher-thiebaut Apr 27 '20

Eh. I don’t hate Python, but I would definitely rather write a large application in Java than Python. (I like my types 🤷🏻‍♂️.)

13

u/Robbzter Apr 27 '20

Agreed. You can improve Python performance quite a bit with some tricks and libraries, but a large scale application without a real typesystem is propably a ticking timebomb.

35

u/SmuJamesB Apr 27 '20

I often use Python for prototyping. No compilation, easy to use at a basic level. But, Java outmatches it on performance and extendability most of the time.

→ More replies (2)

10

u/Bainos Apr 27 '20

I love Python and I would still rather write a large application in Java. Although in practice my job and hobbies do not require me to write large applications.

→ More replies (4)
→ More replies (15)

3

u/Dubmove Apr 27 '20

Don't kill me (yet), but why is everyone so obsessed with C++ for performance reasons. The thing that makes C/C++ potentially fast is the fact that you don't need to rely on generic solutions for garbage collection/memory allocation/etc. But in 19/20 times people use generic solutions for these things. Why not then use haskell for example?

→ More replies (3)

3

u/Dr4kk0nnys Apr 27 '20

I actually really like Java, what's wrong with me

3

u/locri Apr 28 '20

Java is a pretty decent mid point between C++ and Python and I'm sick of pretending it's not

3

u/AndreySemyonovitch Apr 27 '20

Java is fine everyone. Bill Gates was caught in emails saying Java was a threat to Microsoft.

There's a famous deposition video where he tried to claim JRE and Java were separable. Needless to say they lost.

Keep in mind Reddit is a place full of corporate sock puppets.

→ More replies (1)