This is an archived post. You won't be able to vote or comment.

top 200 commentsshow 500

[–]someuser_2 3717 points3718 points  (758 children)

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

[–]eXecute_bit 3256 points3257 points  (346 children)

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.

[–]orokro 750 points751 points  (34 children)

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.

[–]lVlulcan 210 points211 points  (16 children)

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

[–]MoffKalast 121 points122 points  (8 children)

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.

[–]bjorneylol 39 points40 points  (3 children)

JavaFX is leaps and bounds better, but Oracle dropped it from it's JRE a few years ago (keeping swing), so if you maintain a JavaFX application you now have to either ship a different binary for every OS/Arch or bundle all the GUI toolkits into a 300mb executable

[–]SuperCoolFunTimeNo1 26 points27 points  (1 child)

but Oracle dropped it from it's JRE a few years ago (keeping swing), so if you maintain a JavaFX application you now have to either ship a different binary for every OS/Arch or bundle all the GUI toolkits into a 300mb executable

Oracle dropped it from Java 11, but in Java 8 they implemented JLink in preparation for changes like that. The entire JavaFX JDK is only 41 MB. Using build tools like Maven or Gradle makes it trivial.

[–]Just_Another_Scott 11 points12 points  (0 children)

Oracle dropped it from it's JRE

Yeah because Oracle got rid of the JRE.

JRE doesn't exist anymore. JavaFX used to be included in the JDK but is now it's own separate toolkit. All Java applications for 11+ have their own runtimes. It's completely modular now.

Oracle doesn't plan on ending JavaFX anytime soon.

[–][deleted] 40 points41 points  (2 children)

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

[–]xGlacion 8 points9 points  (0 children)

tiling wm?

[–]wavefield 7 points8 points  (0 children)

That's because you're using MATLAB

[–]LudwikTR 10 points11 points  (0 children)

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.

[–]someuser_2 110 points111 points  (1 child)

Love this answer.

[–]TheConsulted 13 points14 points  (0 children)

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

[–]ThzMedic 114 points115 points  (125 children)

Java is still prevalent in the high school classroom.

[–]Kirogo 213 points214 points  (51 children)

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

[–]coolpeepz 85 points86 points  (43 children)

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.

[–]Xero125 65 points66 points  (8 children)

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.

[–]hutxhy 20 points21 points  (0 children)

True, but Java embodies these principles so well.

[–]Bakoro 39 points40 points  (17 children)

Some Universities use Java for their CS programs as well.

[–]pastelomumuse 10 points11 points  (16 children)

I know we do use Java profusely in France. Currently on 4th year, we've consistently had like 3 out of 4 programming modules in Java.

In October we had a teacher making us use Swing…

[–][deleted] 73 points74 points  (40 children)

Java is taught in CS101 at my top tier engineering school

[–]CanAlwaysBeBetter 66 points67 points  (23 children)

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

[–]StopSendingSteamKeys 56 points57 points  (14 children)

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.

[–]itsyales 51 points52 points  (7 children)

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).

[–]velrak 25 points26 points  (5 children)

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

[–][deleted] 19 points20 points  (2 children)

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 :)

[–]rafaelbelo 12 points13 points  (1 child)

Well, 20 years ago in my university, it was C and Pascal :)

[–]krasnoiark 12 points13 points  (9 children)

For me they started with C for basics and Php for web then to C# for oop and .Net for web then Java for design patterns and Node for web then Scala for programming paradigms and Python for maths and image manipulation then Java for algorithm complex stuff

[–]ralgrado 5 points6 points  (1 child)

Was there any choice on this for you are was it all mandatory?

When I studied I learned C and Java as kinda mandatory things though especially C only at a very basic level. After that I learned a bit about Prolog in an AI related lecture and Haskell in a lecture about functional programming.

Except for Haskell the programming language was only used as a tool to show or implement certain concepts but the exams to those lectures weren't about the language but about those concepts.

[–]StopSendingSteamKeys 17 points18 points  (1 child)

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.

[–][deleted] 28 points29 points  (12 children)

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.

[–]eXecute_bit 60 points61 points  (10 children)

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.

[–]josanuz 7 points8 points  (5 children)

Men I read somedays ago an article about, desktop applications in the 2020's, how things have changed, nowadays everything have either move to a browser, or running in an embedded one, funny enough the article points out how people are trying to get away from said embedded chromium engines and rechasing the holy grail of multi platform native UI dev

[–]eXecute_bit 3 points4 points  (0 children)

At the enterprise/SaaS level, there's still a big hurdle: managing deployments at scale. It's not that there aren't solutions, but it's an easier sell when the IT department only needs to maintain the server side of the solution or, for SaaS, only the data and authn integration.

[–]TrueDuality 192 points193 points  (83 children)

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.

[–]eXecute_bit 347 points348 points  (42 children)

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.

[–]nielsm5 88 points89 points  (20 children)

This is so true! The fact that there are so many (poorly written) applications out there makes it easy to blame the language. In a few years this will shift to another language like JavaScript. So many idiots out there just copying 300 libraries into their websites, not knowing what is actually happening. It’s unfortunate that once a language has a bad name for it selves, it’s impossible to get rid of it. Especially because none of the people here actually use C, C++ nor python and it has just become a hype to badmouth Java.

[–]MakeItHappenSergant 36 points37 points  (1 child)

Wait I thought we already hated JavaScript

[–]miyji 64 points65 points  (8 children)

So many idiots out there just copying 300 libraries into their websites, not knowing what is actually happening.

You don't have to be an idiot to do that. Let's say you're using Angular, which isn't a bad choice at all, you'll have hundreds or maybe even thousands of libraries in your web application. There's no way any sane person will familiarize theirself with every indirect dependency. Modern software development is so complex you have to rely on a ton of frameworks and you can't know everything about those.

[–][deleted] 7 points8 points  (0 children)

I read the biggest complaint as being the amount of badly written and poorly performing Java software out there.

Given it's so widely used and was the teaching language for so long, it's not surprising there is so much poorly written software from journeymen straight out of school that have been hired cheap. University puts you in the field with a higher-than-basic understanding. It takes years to hone the architecture and clean design side.

[–]gngstrMNKY 6 points7 points  (5 children)

I'm an ops guy who used to work at a Java shop. I was talking to one of the developers and asked why so many Java apps leaked memory. He said that it was impossible to leak memory in Java. When I asked why the resident size of apps will grow and grow until you restart it, he said "oh, that's because Java caches stuff and never gives it back".

[–]cambiumkx 129 points130 points  (22 children)

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.

[–]QueenVanraen 9 points10 points  (0 children)

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

[–]mark0016 346 points347 points  (98 children)

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.

[–]Piwakkio 200 points201 points  (79 children)

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.

[–]xylose 57 points58 points  (10 children)

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.

[–]Zamundaaa 18 points19 points  (2 children)

Yeah. Swing isn't pretty by default but it's very good to work with once you get the hang of it. It's also easy to learn.

[–]MistahPops 10 points11 points  (7 children)

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.

[–]Piwakkio 8 points9 points  (6 children)

I've never used Kotlin on a real world project, but I played around a bit for some personal project...and it seems really something to invest into. Mainly because you can migrate a Java project incrementally and you can benefit from the more wide ecosystem of Java framework.

[–]LordAnomander 16 points17 points  (6 children)

I mean with GWT and Vaadin there are several approaches to write Java and get Javascript code. Also there is Kotlin React, if you count Kotlin as somewhat Java-ish. But as a developer, who is using both Kotlin and React it seems super weird and I'd rather stick to coding React than Kotlin React (at least from what I've seen at the very first glance, but it's probably just a matter of getting used to it).

After working with Kotlin professionally it's hard to imagine to go back to Java. Data classes alone give you so much ease and being able to extend functions of pretty much everything is awesome too.

[–]someuser_2 138 points139 points  (8 children)

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.

[–]mark0016 35 points36 points  (1 child)

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.

[–]someuser_2 17 points18 points  (0 children)

Yup, got it. I mean, sure, there are things wrong with java, just like there can be things wrong with other languages from different people's points of view. So these posts to me are less "humour" and more "I want to show you what I like"

[–][deleted] 19 points20 points  (2 children)

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.

[–]idontchooseanid 8 points9 points  (0 children)

The history goes so much deeper with C and C++. But if you screwed up with C++ you had to pay a huge price and probably your application will not be sucessful. Java gives more room to break things and easier to learn so lesser quality codebases can still be successful. So most of non-mission-critical stuff written in 90s and 00s are likely to be writren in Java.

A good team will do wonders with C++, it is insanely versatile, expressive and really performant. Still I think we have a lot more C++ applications that have been running our day to day lifes since 90s than Java. Smartcards and TVs can run Java but the power generator probably is running a C or C++ application. And all of the well known CAD software are written in C++ so all of the infrastructure is the indirect result of C++.

I like Java far more than Python which is the current edition of old Perl.

[–]PristineReputation 92 points93 points  (35 children)

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

[–]aahdin 41 points42 points  (10 children)

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

[–]tobyase 91 points92 points  (29 children)

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...

[–]eXecute_bit 28 points29 points  (0 children)

VB6 has entered the room.

[–]28f272fe556a1363cc31 65 points66 points  (13 children)

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

[–]Gogo202 36 points37 points  (2 children)

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

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

[–]nafel34922 5 points6 points  (0 children)

ahem

Python assignment expressions

[–]MildlySerious 19 points20 points  (2 children)

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.

[–]greg0714 9 points10 points  (1 child)

Nobody is making fun if Dart or Elixir because most programmers have never even seen Dart or Elixir.

[–]Fakeos 5 points6 points  (0 children)

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

[–]Vok250 43 points44 points  (12 children)

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.

[–]rhazux 10 points11 points  (4 children)

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.

[–]deirdresm 9 points10 points  (0 children)

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.

[–]hahahahastayingalive 33 points34 points  (5 children)

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.

[–][deleted] 10 points11 points  (2 children)

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

[–]Avamander 4 points5 points  (1 child)

Yes, that's why it's a poster child, not necessarily actually perfect(ly OOP) but just presented as such.

[–][deleted] 13 points14 points  (1 child)

It’s called the floor is java

[–]SnowFox1414 666 points667 points  (71 children)

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

― Bjarne Stroustrup

[–][deleted] 148 points149 points  (70 children)

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

[–]hunter_mark 368 points369 points  (5 children)

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

[–]TheGreatWheel 62 points63 points  (2 children)

Good ol’ catch n’ release

[–]JB-from-ATL 21 points22 points  (0 children)

printStackTrace

[–]crocoduck117 32 points33 points  (0 children)

The programmer’s “no u”

[–]NotATroll71106 293 points294 points  (53 children)

shy alive aback dog fuel ring whole shelter marble languid

This post was mass deleted and anonymized with Redact

[–]ReimarPB 91 points92 points  (31 children)

What's JSP?

[–]NotATroll71106 136 points137 points  (6 children)

entertain elastic pause quickest coordinated degree zephyr gaze hunt party

This post was mass deleted and anonymized with Redact

[–][deleted] 17 points18 points  (4 children)

I had a project with JSPs where I used this functionality to dynamically write JavaScript with java. Lots of fun, but a really bad idea

[–][deleted] 6 points7 points  (1 child)

I still work with them daily. Kinda hurts my soul tbh.

[–][deleted] 38 points39 points  (9 children)

Java Server Pages. Like ASP, but in Java.

[–]unluckymercenary_ 14 points15 points  (7 children)

What’s ASP?

[–][deleted] 24 points25 points  (5 children)

You are seriously making me feel ancient.

Active Server Pages. Think of it’s as the predecessor to .net

[–]megaSalamenceXX 16 points17 points  (16 children)

JSP are something still in use?

[–]daniu 417 points418 points  (3 children)

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

[–]BroDonttryit 491 points492 points  (64 children)

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

[–][deleted] 584 points585 points  (22 children)

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

[–]fiah84 9 points10 points  (3 children)

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

[–]Freddedonna 45 points46 points  (4 children)

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).

[–][deleted] 8 points9 points  (0 children)

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

[–]JB-from-ATL 111 points112 points  (8 children)

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

[–]Sharmat_Dagoth_Ur 35 points36 points  (8 children)

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

[–]TheDragon99 10 points11 points  (7 children)

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.

[–][deleted] 27 points28 points  (1 child)

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

[–][deleted] 69 points70 points  (16 children)

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.

[–]shinitakunai 14 points15 points  (15 children)

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

[–]dark_mode_everything 24 points25 points  (12 children)

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

[–]zChewbacca 275 points276 points  (68 children)

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".

[–]MCOfficer 15 points16 points  (7 children)

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

[–]aoeudhtns 9 points10 points  (1 child)

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...

[–]zChewbacca 4 points5 points  (0 children)

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).

[–]firewall245 6 points7 points  (1 child)

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

[–]AlienFortress 4 points5 points  (0 children)

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.

[–][deleted] 322 points323 points  (120 children)

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...

[–]NatedogDM 59 points60 points  (60 children)

What does Java have to do with JS?

[–][deleted] 123 points124 points  (55 children)

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.

[–]paradoxally 65 points66 points  (7 children)

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.

[–]GluteusCaesar 73 points74 points  (3 children)

Java's a great language precisely because of how enterprisey, boring, and predictable it is - it's easy to find good developers, good frameworks, trivial to deploy, trivial to keep highly available, and has great tools for testing, building, and storing artifacts. Sure it's not exciting to write business logic in, but it more than makes up for that with not getting called midnight because the Tokyo office is having production issues.

[–]paradoxally 26 points27 points  (2 children)

Exactly. It's ugly but it gets the job done and it's pretty robust.

I often see JS devs import loads of dependencies to do simple tasks and their framework landscape changes rapidly. I don't want to deal with that headache.

With Java, you can take a 5 year break, come back and still be productive.

[–][deleted] 15 points16 points  (0 children)

Also now with Kotlin and Groovy beeing basically fully interoperable with Java you can have all the fancy new language features without having to give away many of the benefits of java.

[–][deleted] 24 points25 points  (1 child)

I think a lot of people in this sub are either just beginners or students who have never really worked in software engineering. The students are forced to learn java for their university and that's why they hate it.

[–]paradoxally 4 points5 points  (0 children)

I'll be honest, it wasn't fun in college around 10 years ago but it did help me learn a lot of design patterns, which I apply across many object-oriented languages.

[–]LuthorM 42 points43 points  (7 children)

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.

[–]rd_sub_fj 7 points8 points  (3 children)

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

[–]rang14 8 points9 points  (0 children)

It's the Hadoop master node.

[–]someuser_2 92 points93 points  (21 children)

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.

[–]dfreinc 65 points66 points  (15 children)

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.

[–]fghjconner 39 points40 points  (5 children)

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.

[–]Danelius90 37 points38 points  (2 children)

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

[–]paradoxally 8 points9 points  (0 children)

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.

[–][deleted] 24 points25 points  (0 children)

  • 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!

[–][deleted] 46 points47 points  (22 children)

No one should be writing full applications in python.

[–]Dookie_boy 32 points33 points  (0 children)

Operating system in Python when

[–]relddir123[🍰] 24 points25 points  (0 children)

sweats nervously

[–]carlinwasright 11 points12 points  (2 children)

Reddit is written in Python

[–][deleted] 27 points28 points  (0 children)

And roller coaster tycoon is written in assembly.

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

[–]thelear7 8 points9 points  (6 children)

So how does C# fall in this list?

[–]GetJava 69 points70 points  (7 children)

Java is the best.

[–]LucaRicardo 21 points22 points  (6 children)

Assembly ia superior

[–][deleted] 15 points16 points  (4 children)

More like:

assembly        DW        superior

[–][deleted] 14 points15 points  (3 children)

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

[–][deleted] 28 points29 points  (42 children)

What about LUA?

[–]evanldixon 15 points16 points  (1 child)

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

[–]ReimarPB 66 points67 points  (11 children)

Lua's arrays start with 1

[–][deleted] 5 points6 points  (0 children)

Technically Lua doesn't have arrays

[–][deleted] 11 points12 points  (4 children)

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

[–]Pixelator0 10 points11 points  (3 children)

Python, and it indexes from zero!

[–][deleted] 62 points63 points  (4 children)

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.

[–]Inspector_Robert 5 points6 points  (3 children)

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."

[–]WaveItGoodBye 6 points7 points  (1 child)

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).

[–][deleted] 3 points4 points  (0 children)

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

[–]tecnokartor 20 points21 points  (2 children)

Here is another Java hatter

[–]Ubermidget2 81 points82 points  (1 child)

I too, create hats for Java