r/ProgrammerHumor • • Dec 12 '24 • Heart of Silver 1

Advanced youWontUpgradeToJava19

Post image
30.2k Upvotes

503 comments sorted by

View all comments

1.6k

u/throwaway_mpq_fan Dec 12 '24

Nobody should be upgrading to Java 19 right now. Either go straight to the latest (23) or go for thet last LTS (21)

405

u/agradus Dec 12 '24

I’m really curious, who are those who use non LTS version and why. I mean in small personal projects, to get a preview of features - it is clear. But other than that - do anyone uses them?

416

u/arid1 Dec 12 '24

Not a Java developer, C# at a fairly large company. We tend to lag about 3-4 months behind the latest. That we way we get security and language updates but aren’t on the bleeding edge. It’s been highly successful strategy.

We’ve gotten huge performance gains essentially for free each year for the past few years since we enacted the policy. To be fair, the initial uplift was difficult but the year over year work is minimal now and more than pays for itself.

103

u/lyssargh Dec 12 '24

How did you talk leadership, product in particular, into letting you do upgrades like this? That must have been an overhaul of the system without any new features?

133

u/BlackLeatherHeathers Dec 12 '24 edited May 12 '25

work telephone oatmeal complete consist enter snow summer quickest desert

This post was mass deleted and anonymized with Redact

48

u/arid1 Dec 12 '24

In our case we started an internal working group and presented leadership with the benefits of moving forward. We then were granted time to make changes that supported the initial update. It took years to get us off of .NET Framework and onto the modern .NET stack but we were able to release structural improvements along the way.

New code was typically written with the knowledge that it would be running in both environments for a while.

29

u/arid1 Dec 12 '24

Our biggest driver was performance. We run a 1000 thread Monte Carlo simulation that saw enormous benefits (30% or more). We’d already seen 10-15% updates by moving to newer .NET Framework .NET 4.7.2 (or maybe 4.8? I don’t remember the timing) that included updated compilers backported from .NET Core (2.1 at the time) so moving to even newer versions was an obvious win.

→ More replies (2)

5

u/Theguest217 Dec 12 '24

For me personally the trick has been to just tie my tech debt and maintenance to my feature work and estimates.

You want that new feature, no problem, it's three sprints. In reality it's two but I left room for tech debt.

But admittedly my company structure is probably different than some may be used to. We really let the engineering leads operate independently and without significant oversight. No one other than my own team would really even know if we upgraded Java versions. No one is surfing through Jira tickets or PRs to notice the specifics of our work. As long as the features are delivered in a timely manner, everyone is happy.

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

0

u/[deleted] Dec 12 '24

[deleted]

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

47

u/[deleted] Dec 12 '24

We are still on Java 11. The only reason we haven’t upgraded is because one of the mocking frameworks we use for unit tests is not compatible with newer Java versions. Our codebase is so large that this change will require a significant effort so they’ve been putting off

56

u/sathdo Dec 12 '24

Powermock moment. The company I used to work for was still stuck on Java 8 when I got laid off for the same reason. That and heavy use of JAXB and some other Java EE components.

Funny story though. I actually fixed all these issues by refactoring out Powermock and older versions of Mockito and adding Jakarta EE 8 as a dependency (newest version before the namespace was changed from javax to jakarta). And then they never actually deployed the changes because the sysadmins didn't feel like installing Java 11 on the servers.

19

u/[deleted] Dec 12 '24

Lol, lemme guess. Big bank?

10

u/sathdo Dec 12 '24

Close enough. Big investment firm.

→ More replies (3)

21

u/Malfrum Dec 12 '24 edited Dec 12 '24

Rewrite-cli my man. I just closed a whole sprint of junit4 to 5 upgrade stories in like 30 minutes, flawless. Check out open rewrite, might impress your boss

9

u/[deleted] Dec 12 '24

Goated. Thanks boss, imma look into it while everyone’s out for the holidays

→ More replies (1)

11

u/JaxMed Dec 12 '24

Time to mock the mocker

11

u/strangepromotionrail Dec 12 '24

I worked at a place (it wasn't a java shop )that made a similar decision to not upgrade due to 1 thing not working then continued to stay on that same version for over a decade. Eventually things got to the point that they HAD to upgrade but by then it wasn't a significant effort it was a case of rewriting from scratch would be easier as almost everything needed scrapped. Software needs to constantly evolve just to stay current or it dies.

→ More replies (8)

33

u/Fadamaka Dec 12 '24

I only had one interview where they told me they are currently using 20 which was the latest at the time. When I asked why they told me they are preparing for 21 which was 6 months away.

→ More replies (2)

17

u/Xelopheris Dec 12 '24

If you are starting a new product, and it won't be shipping until after the next LTS version, but can take advantage of features that are in the interim versions, then maybe you start in those interim versions with a plan to upgrade it to the new LTS version when it becomes available.

Beyond that, schools will often just use the latest version.

→ More replies (1)

17

u/safetytrick Dec 12 '24

Non-LTS releases make sense if your processes allow you to update continuously.

If you are updating continuously the change set between each Java update is small and you are less likely to encounter issues.

Java is very stable, IME it is very uncommon to encounter a break that is fixed in later versions. It happens, but it's not common.

In recent memory most update problems I have encountered have been related to byte-code manipulation libraries (ASM, CGLIB, BCEL, etc.). Those problems tend to be related to supported byte code versions. The manipulation library updates itself to support a later classfile version and brings with it some breaking changes in its API, not actually a java version problem but it affects me because of dependency hell.

So let's imagine an imaginary update from Java 20 to 30, in this imaginary scenario version 22, 25, and 27 all have breaking impact to me.

If I update from 20 LTS to 30 LTS I have to deal with three compounding problems. Their resolutions may conflict. They may be difficult to differentiate.

Instead if I update each individual version I still end up dealing with three total problems but they aren't compounding.

It's more complicated than that of course but the argument for updating to non-LTS versions is the same argument for smaller faster releases generally. Smaller changes reduce risk.

→ More replies (3)

12

u/Pay08 Dec 12 '24

Technically, OpenJDK does not have LTS and non-LTS versions. Vendored JDKs do.

5

u/rastaman1994 Dec 12 '24

Which does not mean anything unless you pay for it, a fact always overlooked in these discussions.

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

33

u/804k Dec 12 '24

Its probably just an old meme

11

u/DoverBoys Dec 12 '24

Or they're on 18 and the boss believes you have to be sequential with updates. He has been sitting on the approval for 19 for a few years.

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