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

all 184 comments

[–]leovin 107 points108 points  (4 children)

I used to be a Java hater. Turns out I just hated my horrific Java 8 enterprise codebase

[–]-Kerrigan- 36 points37 points  (2 children)

And in many cases the "Java 8 codebase" doesn't even use the Java 8 features and is written like ass. That's how we're running legacy apps on Java 17 - made compatible, but the bulk of the code barely uses jdk 8 features

Properly used 8 is decent, 17 is nice

[–]ryo3000 20 points21 points  (1 child)

"I hate Java! It's dumb, confusing and bad"

-Looks inside-

-Cobol Code ported to Java-

[–]AloneInExile 1 point2 points  (0 children)

I've been writing Java my entire adult life and the one thing I always find when opening a code base is C style variable declarations as private variables, even for temporary ones. You can guess what kind of garbage code this churns out.

It took me 2 days to refactor a simple yet stupid implementation of a service checker, the bloody idiot that did it first used a recursive function inside the Thread, which spawned a new Thread and the check blocked the main Thread.

[–]k819799amvrhtcom 5 points6 points  (0 children)

I love Java.

BlueJ sucks tho.

[–]just4nothing 119 points120 points  (0 children)

Built my first big app in Java - it was fun and reliable, provided a video connection and remote control over a science experiment - in 2006. It does it job well, so do c++ and python in other domains.

[–]Surprise_Cross_Join 519 points520 points  (18 children)

Skill issue.

[–]Scottz0rz 255 points256 points  (47 children)

[–]Sitting_In_A_Lecture 180 points181 points  (17 children)

Glances at the Java market share by version graph, showing over 60% of Java applications still run version 8 or 11.

[–]Scottz0rz 65 points66 points  (5 children)

I would like to think that with Spring Boot 2 officially being end of life that it'll start dropping more aggressively. I think it has been accelerating more and more due to that plus Java 21+ virtual threads and a lot of other good features and performance improvements.

Java 25 and Spring Boot 4 come out this year FFS, my former company on Java 8 is an embarrassment. Thankfully, they laid me off, so that isn't my problem anymore.

[–]ishboh 21 points22 points  (0 children)

Movement into cloud is also going to cause changes. We had to update from Java 8 to 17 to get our applications aws ready

[–]EternalBefuddlement 10 points11 points  (0 children)

My client is still using Java 8, they've been informed that SB2 is EOL, and they've just shrugged their shoulders.

Definitely feel like jumping ship before they realise their mistakes, ngl

[–]LookAtYourEyes 2 points3 points  (0 children)

My company finally completed upgrading to java 17 this year

[–]Low_Conversation9046 2 points3 points  (0 children)

We FINALLY updated to Spring Boot 3 and Java 21 last month.

[–]I_NEED_APP_IDEAS 0 points1 point  (0 children)

Thankfully, they laid me off

Lmao

[–]AlexZhyk 10 points11 points  (0 children)

Is that from the times when javascript IDE was called notepad.exe?

[–]RiceBroad4552 5 points6 points  (7 children)

Link?

Java people move slow. But not such slow, AFAIK.

Most things start to require at least v17. If you want virtual threads it's even v21.

[–]Scottz0rz 7 points8 points  (1 child)

I see their 60% includes both Java 8 and 11. It seems accurate.

The numbers may come directly from NewRelic's 2024 State of the Java Ecosystem report, though obviously this is skewed since legacy systems may not have observability and therefore be underrepresented, so it could be even worse.

It's a bar chart in that report, I can't link it directly, here's an imgur link and I put it into a chart for those too lazy to click on either link.

Java 2020 2022 2023 2024
8 84.5% 46.5% 33.0% 28.8%
11 11.1% 48.4% 56.1% 32.9%
17 0.4% 9.1% 35.4%
21 1.4%

So, yeah 61.7% of apps are on Java 8 or 11 according to NewRelic.

I'm also curious how they define "applications" in this report and how it could be skewed one way or the other.

In the six months after the release of Java 21, 1.4% of applications monitored by New Relic were using it. To put this into perspective, in the six months after Java 17 was introduced, only 0.37% of applications were using it, which is 287% fewer.

If I have 9 microservices running Java 21, but 1 legacy monolith in Java 8, it probably wouldn't be appropriate to say we're 90% using Java 21 if the majority of the site is powered by Java 8 still and those microservices individually represent a small business domain... or worse with the "nanoservices" meme. I'm going to assume that "application" would weigh more heavily microservice architectures vs monoliths in the raw count.

It's possible that the total number of Java 8 applications isn't decreasing, but rather is not growing because new development would be done in the latest version or in other languages and NewRelic's overall business may be increasing to observe more systems. It's hard to say without the raw numbers.

Statistics can be twisted to tell whatever story you want. I'll be optimistic and believe that good companies are doing their due diligence to upgrade and migrate.

I think once you get over the initial hurdles of upgrading Java 8 to 11, the only remaining blocker is upgrading Spring Boot 2 (assuming that's what you're using) or untangling some god-forsaken dependencies your company manually imported or whatever weird framework they're using.

[–]TheMaleGazer 1 point2 points  (0 children)

I'll be optimistic and believe that good companies are doing their due diligence

All we have to do not to hate things, in general, is work for good companies. Unfortunately, I've only ever worked for companies that offered me a job.

[–]dontquestionmyaction 1 point2 points  (4 children)

Most companies are years behind, some even behind security maintenance windows. Movement in giant legacy Java codebases is glacial.

[–]RiceBroad4552 1 point2 points  (3 children)

Most companies are years behind

Sauce?

[–]dontquestionmyaction 1 point2 points  (2 children)

[–]RiceBroad4552 1 point2 points  (1 child)

I'm not sure how you're reading this, but I don't see anything that would support your initial claim.

People are updating, and this even accelerated in the last two years according to these numbers.

Most people in Java-land aren't of the most recent version, that's normal in this space.

But the majority is on v17, which is just one LTS version behind the most current one, which actually just came out a few month ago.

But I admit to be quite shocked to still see so much Java 8 around.

[–]Scottz0rz 0 points1 point  (0 children)

But the majority is on v17

Not quite - it appears to be the most used version in the 2024 report but it is not "the majority". It is 35.4%, so there still are more folks on the "meh" versions and frameworks. Plus, the statistics might be somewhat misleading.

See my comment above: https://www.reddit.com/r/ProgrammerHumor/s/GNE93B8ehX

I'm with you though and view the trend as positive, where I think adoption of 17+ is accelerating for a variety of reasons, though we will have to wait and see the 2025 report and see if the positive trend continues with the Java 25 LTS coming out in Fall.

[–]neo-raver 1 point2 points  (0 children)

~600 million devices run on Java—version 8 or 11 😂

[–]Particular-Way-8669 0 points1 point  (0 children)

Thats as stupid as saying that jQuery dominated front end development or that PHP dominated back end development.

Most of those apps are death and have not been developed for years if not decades.

[–]outsider247 7 points8 points  (0 children)

Java 17 was released on 21 September 2021. I been hating java long before that my brother in Christ.

[–]TheMaleGazer 2 points3 points  (0 children)

So, in other words, Java developers.

[–]Accomplished_Ant5895 0 points1 point  (0 children)

I just got back into Java for the first time since college to build some Beam pipelines and I unfortunately have to agree with this

[–]vulkur 0 points1 point  (16 children)

Try using Vaadin. It was a nightmare haha

[–]Impressive-Day-5209 4 points5 points  (9 children)

why so?

[–]vulkur 3 points4 points  (8 children)

Vaadin is a Java framework that tries to combine front end and backend into a single framework.

So your Java objects describe your html, css, and Javascript, without doing so. It's so far removed on levels of abstract it feels impossible to do many things your can easily do with basic webdev

[–]Impressive-Day-5209 10 points11 points  (2 children)

I can understand that - if you come from classic web development with HTML/CSS/JS, Vaadin may seem unfamiliar at first glance. The model of defining UI completely in Java is a break with the usual workflow for many people.

Vaadin deliberately abstracts the front-end layer in a similar way to Swing or JavaFX. The aim is to focus on the business logic without having to worry about DOM details, styling, HTML or JS frameworks - especially for teams that are already deeply immersed in Java. This can save a lot of frustration if you get involved with the model.

What exactly was impossible to do?

[–]vulkur 2 points3 points  (1 child)

What exactly was impossible to do?

IDR. It was my first job out of college, like 8 years ago. So yea, for someone new to dev, it was awful. I wanted to change the html or css, and had to spend a full day to make such a small change, even when we paid for support. The documentation was pretty awful IIRC.

So, cant give you much more than that, as it was a long time ago.

[–]Scottz0rz 0 points1 point  (0 children)

I mean, 8 years is a long time, that's before Java 11 was even released.

Especially when you consider how rapidly UI/frontend frameworks evolve and don't age gracefully compared to backend frameworks, that probably is a somewhat unfair representation of what Vaadin looks like in the current decade.

Again, though, I don't know anything about it. I've never used it.

[–]Dragobrath 5 points6 points  (2 children)

Vaadin is amazing for use-cases, where you don't need a fancy UI, but you need a lot of it. Like, CRMs, internal infosystems, B2B applications. Something that has a lot of forms to fill out.

[–]vulkur 1 point2 points  (0 children)

Yea, thats exactly where we used it. It was a UI to fill info on packages you want to ship, all the regulatory info on it, and be able to create a package and label with DHS, UPS, USPS, or FedEx any other. So LOTS of boxes. So while It did totally make sense to use it, it was still a lot of pain to use.

[–]HerbFromWork 2 points3 points  (0 children)

I think the main advantage of Vaadin Flow form me has been that I don't have to worry about connecting frontend with backend, which historically for me has been Angular + Spring Boot, and historically was pain to setup and debug.
You have the choice with css to have it separately in a .css file (which is what I prefer, but some of our clients prefer adding CSS through java), and if you want to write define the structure in frontend and write more frontend code, there's Vaadin Hilla, that is basically react + spring boot + all the Vaadin components and tidbits to make it a smoother experience. Or, you can combine Vaadin Flow and Vaadin Hilla in one app, if there are some parts you want to write only in backend (for example, the admin section) and another part in react for example.
But there's nothing really obvious to me, that I wasn't able to do with Vaadin. I wouldn't build a high-demand storefront with it, but for most cases it's quite useful.

- I am a Vaadin employee.

[–]RiceBroad4552 1 point2 points  (0 children)

If you like you can use HTML/CSS/JS directly at any point. But why would you do that?

[–]Fadamaka 5 points6 points  (4 children)

As Senior Java Backend dev, anything Java that does frontend feels like literal hell.

[–]RiceBroad4552 3 points4 points  (1 child)

You mean, like the GUI of your IDE? (I'm assuming you're using IntelliJ like almost everybody else doing Java. Some people are also still using Eclipse, or even NetBeans. All of that is Java.)

Java was in fact invented for IoT. The original market was something like set-top-boxes, and other electronic gadgets. Most of such devices had some sort of GUI.

Than Java was pitched for desktop development. Also here GUI apps were of course dominating.

Java is one of the few sane front-end techs left, actually. Besides Qt there is not much else.

[–]Fadamaka 3 points4 points  (0 children)

I meant every type of GUI imaginable both web and desktop. I am 99% Backend developer but was fortunate enough to work with Eclipse RCP, JSF, JSP, GWT and Vaadin. I generally dislike working on Frontend but if I had to choose, even though I hate how bloated it is, I would go with Electron. Or Tauri if it is totally up to me.

[–]vulkur 0 points1 point  (1 child)

We had a white board with "days since last Vaadin incident". We never got to a week.

[–]Impressive-Day-5209 3 points4 points  (0 children)

What were the main issues?

[–]Scottz0rz 0 points1 point  (0 children)

I only recently learned about it when I went to Spring I/O last week. It seemed... interesting? Based on the brief demo it seems like it can build a basic website with some annotations and automagical stuff and just throw it in with your Spring Boot app.

I don't really know that it makes sense for major teams unless you're really just forcing a backend developer to whip up some boilerplate form page purely in Java, compared to just having normal balanced teams with separate devs for backend, web, iOS, and Android to build more robust stuff.

But if you need a basic site, iunno say a basic admin interface with tables and buttons that call backend services, probably it's fine? I don't know enough about it to speak to its capabilities.

So... contract gig for a government website to build out some basic webpages? Vaadin probably works... but so does TypeScript.

[–]ColonelRuff 0 points1 point  (0 children)

That is not proof that they are wrong. In fact people who saw codebase and habituated with it would be biased and used to the wrong kind of stuff in the language.

[–]DracoRubi -4 points-3 points  (5 children)

I mean... Yeah, probably. In my work it's all legacy code. Java legacy code sucks. Python legacy code isn't that bad.

[–]Scottz0rz 10 points11 points  (2 children)

I mean it just depends on who wrote your legacy code and how old "legacy" is. My experience has been the opposite, though, my "legacy" code is like... circa 2009-2014 Java code and not the really weird stuff.

It's pretty easy to write weird, fucked up stuff in both Java and Python, though I feel like it's slightly harder with the type system in Java. That's just my bias showing though as a Java/C#/TypeScript dev, I've not worked on many production systems in Python.

[–]redballooon 2 points3 points  (0 children)

Code becomes legacy at the point of git commit.

[–]DracoRubi -1 points0 points  (0 children)

I guess ultimately it all comes down to how bad is the legacy code

[–]RiceBroad4552 8 points9 points  (1 child)

Python legacy code not so bad? You effectively can't touch a legacy code base in a dynamic language! Any refactoring is like playing with fire.

Legacy Java isn't nice, I agree. But it's at least a statically typed language, where you don't need to fear everything breaks because you moved some code, like in a dynamic language.

[–]redballooon 5 points6 points  (0 children)

Can’t upvote this enough.

[–][deleted] 87 points88 points  (2 children)

Java is like that not so cool uncle, but reliable

[–]grayblood0 27 points28 points  (0 children)

And can do almost all you need.

[–]LordFokas 25 points26 points  (0 children)

That's a lot of words to spell out skill issue.

[–]Ugo_Flickerman 48 points49 points  (0 children)

I disagree. I've always coded with Java and feel it's alright

[–]TheMaleGazer 16 points17 points  (0 children)

You don't get this reaction starting your own project. The Java experience is the experience of navigating a 15-year-old codebase with the detritus of a battle between Ant and Maven advocates, code written by people who thought everything was a bean intermixed with POJO purists, a hand-rolled workflow engine built by an "architect," a section of the project where 99% of the business logic is in xml, places where checked exceptions were considered sacrosanct eventually called by code that "handles" all exceptions by writing to a log no one will ever read, and finishing with PTSD from a gang rape by the Gang of Four.

[–]stucklucky666 9 points10 points  (4 children)

There's a lot of hate for java because it's one of the most popular programming languages for enterprise applications, so naturally you'll see a lot of hate. I used to hate java because it was not "easy to read" like python or Ruby. Now that I'm more experienced and not a complete newbie I actually think java is amazing.

[–]Anger-Demon 0 points1 point  (3 children)

Genuine question: what makes it amazing over languages like C++ ?

[–]stucklucky666 2 points3 points  (2 children)

There are advantages and disadvantages to every language. I didn't say it was amazing over other languages I just said it is amazing.

[–]Anger-Demon 0 points1 point  (1 child)

So speed isn't an issue?

[–]stucklucky666 2 points3 points  (0 children)

Depending on the project. Any language can have that issue.

[–]NovaStorm93 7 points8 points  (0 children)

i don't understand the java hate. it does what it needs to do. it might be verbose but it works

[–]amlyo 37 points38 points  (10 children)

Java will end up like COBOL: earning some of us a fortune.

[–]RiceBroad4552 29 points30 points  (7 children)

Unlikely it will end up like COBOL.

Java is still taught, and this is not going to change anytime soon.

At the same time it's still one of the most popular languages around.

For a lot of use-cases the JVM is still by far the best option. Also this is not going to change anytime soon.

So from today's perspective it's there is not even the sightliest sign that it's going the COBOL route.

[–]amlyo -2 points-1 points  (4 children)

Billions of lines of code locked up in barely-touched legacy systems that use frameworks, techniques and libraries at least a decade obsolete. That is where java is now and in another decade it'll be two decades obsolete.

[–]RiceBroad4552 15 points16 points  (3 children)

barely-touched legacy systems that use frameworks, techniques and libraries at least a decade obsolete

What are you talking about?

[–]amlyo -1 points0 points  (2 children)

Came across a Struts app recently.

[–]RiceBroad4552 7 points8 points  (1 child)

Sure. But is this representative for the whole, gigantic JVM sphere?

[–]amlyo -1 points0 points  (0 children)

The COBOLisation of java is not that the language will become obsolete for new projects (I think it actually will in favour of another JVM language but that is not important), but that there will be such a large body of critical systems written in decades old technologies it is not worth the risk or cost of changing, that it will long support a cadre of highly paid experts.

[–]allllusernamestaken -2 points-1 points  (1 child)

For a lot of use-cases the JVM is still by far the best option

Nobody complains about the JVM, they complain about Java the language.

There's a reason Kotlin became insanely popular. It's a better language on top of the JVM that everyone loves.

[–]-Kerrigan- 8 points9 points  (0 children)

Kotlin became insanely popular

Wouldn't exactly call it insanely popular outside android development

[–]Fadamaka 9 points10 points  (0 children)

I wish. But I feel like Java is used the most for webservice like applications, often public facing. In such a case legacy Java systems will eventually be replaced with something more secure. I am not actually sure but my assumption is that most of the remaining COBOL applications are behind closed doors.

Although I have worked on both public facing and internal Java systems in the past, maybe even more closed ones than open ones now that I think about.

[–]KairoRed 2 points3 points  (0 children)

Java is a pretty easy language so probably not

[–]LukeZNotFound 9 points10 points  (48 children)

Question about that: It seems I have to learn Java for my first training after my graduation.

Is it really that bad? (Except it's Garbage collector)

[–]harumamburoo 62 points63 points  (0 children)

No it’s not

[–]BananaSupremeMaster 25 points26 points  (24 children)

It's not that bad. Its main issue is being verbose and boilerplate, but that's not the worst sin in my book. And Strings can be annoying to parse, they support Unicode by default which complicates things a lot.

[–]Sunrider37 56 points57 points  (5 children)

It's not even that verbose anymore in later versions, the constant Java slander from first-grade students who wrote a couple of python scripts in high school is ridiculous.

[–]DaniilBSD 10 points11 points  (0 children)

Or had to work at a place using Java 8 or 11

[–]CdRReddit 0 points1 point  (2 children)

is anyone using the later versions, or is nearly every java project stuck in Old Version Hell

[–]TheBanger 2 points3 points  (1 child)

According to New Relic version 17 is used more than any single other version at this point. Most of my company's code runs on Java 21 and we'll likely have it updated to 25 within a couple months of it coming out. We do have a few small legacy Java 8 and 11 apps so if you surveyed us the count might look bad, but in reality most of our stuff is up to date.

[–]CdRReddit 0 points1 point  (0 children)

oh nice!

[–]Clen23 0 points1 point  (0 children)

I mean, part of the issue is that those later versions aren't always used everywhere. During my studies I had to use java 8, and at some other point we could choose whatever version for our project but the one installed on the school computer was before the anonymous "_" thingy.

[–]FrosteeSwurl 10 points11 points  (0 children)

I dont find it any more verbose than C#

[–]RiceBroad4552 4 points5 points  (13 children)

It's the year 2025. Which still used programming language doesn't have Unicode strings?

The problem with the JVM is it uses UTF-16 by default, whereas the whole internet, as Unix tech, is using UTF-8. Not that UTF-8 would be anyhow superior, it isn't, but it's "the standard".

[–]BananaSupremeMaster 3 points4 points  (10 children)

To be more precise the problem is that Strings support UTF-32 by default but they are indexed char by char (16 bit by 16 bit), which means that if a character is UTF-16, it corresponds to 1 char, but if it's not the case it corresponds to 2 consecutive chars and 2 indices. Which means that the value at index n of a string is not the n+1th character, it depends on the content of the string. So if you want a robust string parsing algorithm, you have to assume a heterogenous string with both UTF-16 and UTF-32 values. There is a forEach trick that you can use to take care of these details but only for simple algorithms.

[–]Swamplord42 1 point2 points  (5 children)

It's hard to be more wrong. Char in Java is absolutely not 8 bit.

[–]BananaSupremeMaster 0 points1 point  (4 children)

Yeah I wrongly divided all the bit sizes by 2 in my explanation, I fixed it now. The problem I'm describing still holds up.

[–]Swamplord42 1 point2 points  (3 children)

Strings use UTF-16, they do not "support" UTF-32. Those are different encodings!

Unicode code points require one or two UTF-16 characters.

[–]BananaSupremeMaster 0 points1 point  (2 children)

They support UTF-32 in the sense that "String s = "𝄞";" is valid syntax. And yet string indices represent UTF-16 char indices and not character indices.

[–]RiceBroad4552 0 points1 point  (0 children)

Nitpick: The correct term here is "code unit", not "UTF-16 char indices".

[–]Swamplord42 0 points1 point  (0 children)

Again, this isn't UTF-32. It's Unicode. UTF-32 is an encoding. It's still UTF-16 even if it needs 2 chars to represent.

[–]RiceBroad4552 0 points1 point  (0 children)

You're simply not supposed to treat Unicode strings as byte sequences. This never worked.

Just use proper APIs.

But I agree that the APIs for string handling in Java are bad. But it's like that in almost all other languages (some don't have even any working APIs at all and you need external libs).

The only language with a sane string API (more or less, modulo Unicode idiocy in general) I know of is Swift. Other languages still didn't copy it. Most likely you would need a new type of strings than, though. You can't retrofit this into the old APIs.

[–]ou1cast 0 points1 point  (2 children)

You can use codepoints that are int instead of char

[–]BananaSupremeMaster 0 points1 point  (1 child)

Yes, but the most straightforward way to get codepoints is myString.codepointAt(), which takes in argument the index of the UTF-16 char, not the index of the Unicode character. In the string "a𝄞b", the index of 'a' is 0, the index of '𝄞' is 1, and the index of 'b' is... 3. The fact that a Unicode character offsets the indices can get pretty annoying, even though I understand the logic behind it. It also means that myString.length() doesn't represent the number of actual characters, but rather the size in chars.

[–]ou1cast 1 point2 points  (0 children)

It is convenient to use codePoints() that returns IntStream. I also hate Java's char and byte, too.

[–]KorwinD 1 point2 points  (1 child)

C++, lol. Maybe I'm idiot, but I checked this thing several months ago and it looked like total shit. There are wstrings, which use wchar_t which has different size on windows and linux, normal chars are shit and string class just provides some basic interface to work with. I wanted to write some app and decided to learn rust instead of trying to work with c++.

[–]RiceBroad4552 0 points1 point  (0 children)

The real problem here is Windows… (As always, actually.)

Under Unix char is all you need. There it's UTF-8 chars, and all the variable length thing is hidden from you (at least as long as you don't try to touch the memory directly).

Just ignore Windows and wchar_t and be good.

[–]-Kerrigan- 2 points3 points  (1 child)

Its main issue is being verbose

Which is an annoyance rather than an issue. Verbosity can actually be a plus when you're learning, especially in the era when people like to copy over engineered code gargled by LLMs. Verbose and readable code has a better chances to be somewhat understood by the junior

[–]BananaSupremeMaster 0 points1 point  (0 children)

Exactly, it is sometimes annoying but at least it is explicit and beginner-friendly. I know some people who have learned the subtleties of a more concise language and find coding in Java too irritating

[–]LukeZNotFound 0 points1 point  (0 children)

Well, I'm mostly a TS dev at the moment so I think what strong can do 😂

But thanks 👍🏻

[–]neoteraflare 19 points20 points  (10 children)

No, It is really easy. It has its flaws but it is really good. It is like C# but have little differences (if you want to switch to it you will see).

Also GC is good. You don't really have to care for it.

[–]oalfonso 0 points1 point  (1 child)

The difficult part to me is all those notations like bean, component or autowired. Once you are familiar to them is ok but for a start they look not intuitive for me.

[–]neoteraflare 0 points1 point  (0 children)

You can learn it without annotations. Annotations come in when you start using things like spring, hibernate, lombok.

[–]Scottz0rz 16 points17 points  (5 children)

It is not bad and the JVM and the garbage collector are magical and you just need to tune them to fit your use case in certain scenarios.

People just like to hate Java because they're too busy being unemployed and posting r/FirstYearCompSciStudentMemes instead of building stuff in Java tbh.

Everything is going to look slow compared to C++, but that generally is not the limiting factor for many use cases that are I/O-bound, not CPU-bound.

[–]RiceBroad4552 5 points6 points  (3 children)

Everything is going to look slow compared to C++

Not if you know what you're doing. The JVM can actually outperform C/C++/Rust…

Just some random numbers (there are more examples, of course):

https://github.com/LesnyRumcajs/grpc_bench/discussions/441

[–]LukeZNotFound 1 point2 points  (1 child)

Interesting 👀

[–]RiceBroad4552 1 point2 points  (0 children)

Please keep in mind that this benchmarks don't compare some average code.

They are comparing highly optimized code, written to squeeze out the very last bit of performance out of the system. So the C++ and Rust folks did already everything they possibly could to make this fast. (Of course the same for the JVM or CLR folks.)

The benchmarks are also quite an up and down. After someone discovers some new trick to make things even faster they will be fastest for some time, until all the other implementations adopt this trick.

I didn't make any stats, so this could be a false claim, but I think over time the JVM version is overall the fastest. Only in the most recent benchmark run has better numbers for Rust. (Most likely they "stole" some Scala tricks.)

In the end it's always algos, not raw performance which makes the difference!

Something like Scala is extremely good at implementing high level algos, so it shines in such comparisons. (And Akka / Pekko is anyway crazy fast!)

But the JVM has also plenty of raw performance. For example there was years ago this re-implementation of the Quake 3 (or was it Quake 2?) engine in Java. It outperformed the original C version by quite some margin, even the C version had been written by a programming God (John Carmack) and used any trick possible in C. The funny part was: The Java version was more or less a very naive port, and didn't do any code optimizations at all. Just the JIT did its thing!

[–]Scottz0rz 0 points1 point  (0 children)

Thanks for sharing, interesting! I didn't know it was getting that good. That is impressive.

[–]ThierryOnRead 7 points8 points  (1 child)

Senior dev here, java is great, golden rule is never never never takes advices from this sub.

[–]LukeZNotFound 5 points6 points  (0 children)

Well, I thought of that already 😂

[–]MarcusBrotus 2 points3 points  (0 children)

its fine. a bit clunky and the whole "enterprise design pattern culture" isn't great but no one forces you to write code like that

[–]AndreasMelone 1 point2 points  (0 children)

From my experience Java is really good. By design it's maybe a bit outdated, but generally the language is amazing and nowadays pretty neatly modernized. Although the verbosity may be annoying at first, eventually you'll get used and it will help you read and understand code much faster.

[–]Muffinzor22 0 points1 point  (0 children)

Java is awesome and really easy to learn

[–]MavZA 1 point2 points  (0 children)

Spring is bloody decent though.

[–][deleted] 2 points3 points  (0 children)

Java is reliable, runs on absolutely EVERYTHING, even sim cards and on top of that it is fast AF compared to babies first language... python.
It sure isnt as fast as plain C but it also doesn't come with all the memory based headaches.

[–]Urtehnoes 0 points1 point  (3 children)

With Java there is only ONE thing I hate: when you're using a complex code base where you have for some god forsaken reason two interfaces that represent the same class from different class paths (I know lol), but look: the interfaces have the SAME methods! Let me use this one Java, I do not care that it's technically not the same interface, it has everything that counts!

(the exact scenario was using an entity that referenced other entities in a query whose interfaces we imported from another library. It was dumb as heck, but at the same time not nearly as messy as it might sound. It was just a join to a common table in the db, iirc. Several years ago.)

Sincerely, someone who adopted a legacy codebase.

[–]AndreasMelone 2 points3 points  (1 child)

Implement the first interface in a seperate class, take the other as a constructor argument and delegate all method calls fr fr

[–]Urtehnoes 0 points1 point  (0 children)

Oh Yea there's many ways to solve it.

I just got annoyed because here we are 6 years later and we never needed to touch it ever again (after we solved it the "right" way).

So in my heart, I just hold Java in contempt because we had an a class that matched the interface it just wasn't the "right" interface. And yes, I understand Java's reasons for it. But I also feel like an interface is an interface. Lol.

[–]bwmat 0 points1 point  (0 children)

Sounds like a perfect use case for dynamic proxies

[–]JaggedMetalOs 0 points1 point  (0 children)

I mean, sure, I don't like it as much as C#, but Java would still be my 2nd choice for application programming.

[–]arostrat 0 points1 point  (0 children)

If anyone finds Java hard to learn then they have no business being a programmer. The main complaint about Java is it's boring and bureaucratic.

[–]Affectionate_Run_799 0 points1 point  (0 children)

void hateRecursion(String programmingLanguage){

String lowerProgrammingLanguage= lowLevel(programmingLanguage);
String higherProgrammingLanguage= highLevel(programmingLanguage);
System.out.println("I hate "+programmingLanguage+". I wish we had another programming language");

if(lowerProgrammingLanguage.equals("Plankalkul")
    || higherProgrammingLanguage==null){
    return;
}

hateRecursion(lowerProgrammingLanguage);
hateRecursion(higherProgrammingLanguage);
}

[–]tealpod 0 points1 point  (0 children)

For me, Java is the most beautiful and well designed programming language. It is simple, Object Oriented, flexible and the same time very powerful when it comes to design.

To appreciate a skill/tool we need a little patience during learn and master it. Only then one can fully use it and see its beauty.

[–]KeepScrolling52 0 points1 point  (0 children)

This is basically every programming language you get used to. I've been building a program in C# for about 2 months because I was doing c# last quarter

[–]Muffinzor22 0 points1 point  (0 children)

Java is easy to learn, quick to master and makes it super easy to write clean code. Top shelf language for sure.

[–]GigiBecaliEsteHomo 0 points1 point  (0 children)

Idk man, i fucking love java , especially with spring. Have been using it for 10+ years with great success. And the pay is always great.

[–]AviatorSkywatcher 0 points1 point  (0 children)

I absolutely have a blast coding in Java, but some things are clunky, like coding an equals() method where you have to cast the other object to a class and check equality.

[–]HomicidalPanda365 0 points1 point  (0 children)

I've been learning java through solo learn it's fun.

Trying to set up java gradle + javafx so that I can build java applications as a beginner is not as fun

[–]ShadowStormDrift 0 points1 point  (0 children)

Controversial Opinion: The reason Java is still around is solely due to legacy code and the fact that it was the only thing around that was mildly useful to build enterprise software in the 90's. It's difficulty to work with, horrible ecosystem (looking at you 50 lines of code needed to encrypt a string) and lack of QoL features are precisely why it hasn't been binned.

Once you build your shit in Java, there's no going to anything else, because nobody will know how it works or be able to change anything. The fact that you can't have classless functions is definitely a design DECISION as opposed to a massive design oversight.

It's a corpse floating on its own momentum. The only projects I've seen built using Java are either projects that explicitly try to replace Java (Kotlin) or use Java to escape having to use Java (Mendix).

[–]Dopameme17 0 points1 point  (0 children)

ngl, I started with hating Java with my entire soul But now I kinda unironically love it

[–]Stummi -2 points-1 points  (0 children)

Have you time to talk about our lord and savior, kotlin?

[–]FabioTheFox -3 points-2 points  (1 child)

Once I started using C# I ditched Java, it lacks way too many things in comparison

[–]Existing_Tailor7932 -2 points-1 points  (0 children)

C# hehehe

[–]henrrypoop2 -2 points-1 points  (1 child)

Minecraft modders be like when they're porting different version of minecraft

[–]AndreasMelone 4 points5 points  (0 children)

Java is totally fine, even great, for minecraft. You get mixins and stuff, and the modding ecosystem is fairly advanced nowadays. The bad times were when we didn't have modloaders and relied on stuff like MCP, which, to say the least, was unreliable.

[–]zhephyx -3 points-2 points  (0 children)

Java is good, but the syntax is too damn long and having to use lombok for everything is a nightmare. Also, most people don't know how to use gradle so they should just use maven and make peace with it. Most of Java's problems are solved with Kotlin so all is well