this post was submitted on 07 Sep 2024
236 points (97.2% liked)

Programmer Humor

19463 readers
15 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
236
Java Was The Future (files.catbox.moe)
submitted 1 month ago* (last edited 1 month ago) by jawa21@lemmy.sdf.org to c/programmer_humor@programming.dev
top 36 comments
sorted by: hot top controversial new old
[–] Grandwolf319@sh.itjust.works 107 points 1 month ago (3 children)

Why do people hate on Java so much, I think it’s a great language.

Do you use Java at work?

Fuck no, I want to stay sane.

[–] LordPassionFruit@lemm.ee 32 points 1 month ago

I work with Java. And I'm definitely 'rose tinted glasses' because I also learned to code in Java. But I'm the opposite.

Do you use Java at home?

Fuck no, I want to stay sane.

[–] abbadon420@lemm.ee 25 points 1 month ago

To me, Java feels nice and homely. Like coming home to your family over Christmas. Of course your parents aren't quite with the times any more and a bit racist, which always makes for a nice discussion with your sister's Hispanic husband. And there's always uncle bob, who gets way too drunk and starts hitting on your wife. Your sister usually tries to get you to invest in her latest MLM scheme and the food tastes like seasoned cardboard. But it's always warm and welcoming. Luckily it's only for the holidays.

[–] ZILtoid1991@lemmy.world 2 points 1 month ago

A lot of people misapply OOP principles, causing them to come up with stuff like ThingFactoryFactory, or the things Enterprise FizzBuzz parodies.

[–] Prunebutt@slrpnk.net 33 points 1 month ago (3 children)

Holy shit! Can that be any more drawn out and boring?

[–] Blue_Morpho@lemmy.world 79 points 1 month ago (3 children)

It's java. Extremely drawn out method names is it's calling card.

[–] Aurenkin@sh.itjust.works 47 points 1 month ago (1 children)

One might even say it's an ExtremelyDrawnOutMethodNamesFactoryImpl

[–] xmunk@sh.itjust.works 21 points 1 month ago

... BeanAbstractBeanFactory

[–] Valmond@lemmy.world 10 points 1 month ago

And slow startup times.

[–] xep@fedia.io 5 points 1 month ago (2 children)
[–] MajorHavoc@programming.dev 12 points 1 month ago

Lol. Two things can both be bad.

[–] Blue_Morpho@lemmy.world 9 points 1 month ago (1 children)

I'm unfamiliar with Mac programming but that looks normal. Do those function calls become absurdly long when used?

Here's one I found on Google from the jdk:

InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonPainter

Yes that's not a typo, internalframe is repeated.

[–] KairuByte@lemmy.dbzer0.com 8 points 1 month ago

I mean, it’s dumb but I know what it is. It’s the painter for the internal frame’s title pane maximize button, which is in the internal frames title, which is in the internal frame.

It’s essentially a dumb way of writing: InternalFrame.Title.MaximizeButton.Painter

[–] abbadon420@lemm.ee 17 points 1 month ago (1 children)

I think it was amusing. A relic of a simpler time

[–] smeg@feddit.uk 6 points 1 month ago (1 children)

It was actually a pretty good Bond parody too!

[–] abbadon420@lemm.ee 2 points 1 month ago

If you are or ever become a mother, you'll be smegma

[–] Aurenkin@sh.itjust.works 9 points 1 month ago

Almost certainly

[–] RonSijm@programming.dev 31 points 1 month ago

That laser at the end should have been Java Technology™ ;

You point it at anything, and end up with a huge dumpster fire... Sounds like Java to me

[–] slazer2au@lemmy.world 30 points 1 month ago

90s. Such a wild time.

[–] ricdeh@lemmy.world 25 points 1 month ago (1 children)

Whoa the disrespect. The way she threw away C++ haha

Also, the whole thing was next-level cringe

[–] jawa21@lemmy.sdf.org 20 points 1 month ago

Granted, she did use it with deadly efficiency. I think that one backfired on them.

[–] Scoopta@programming.dev 22 points 1 month ago (2 children)

Honestly modern Java has a lot of really nice features and I think it gets a lot of unfair hate

[–] TootSweet@lemmy.world 20 points 1 month ago* (last edited 1 month ago) (1 children)

I write Java for a paycheck, but I really hate it.

It feels like everything is layers and layers of overengineered cruft, each added to the precarious tower for something extremely minor. But every subsequent card in the house of cards makes it more precarious. "But look, I don't have to write accessors." "But look, I eliminated the need for the web.xml file." "But look, I don't have to understand SQL now." But look, the codebase depends on a shit-ton of completely opaque Automagic(tm) that you have no hope of understanding the moment something goes wrong -- which it will if you even think of changing your Java version. And since it's practically impossible to understand what's going on under-the-hood of whichever dependency is fubar'd this week, you have to resort to a mixture of trial-and-error and copy-pasting shit (that you also don't understand) from StackOverflow and praying to Cthulhu something works -- which is also trial-and-error because Java questions in particular have tons of just straight up wrong answers.

To be fair, I'm the guy on my team who people come to when they run into those sorts of "I bumped up one subminor version of Mockito to fix a bug that was preventing my unit test from working but now literally half of our unit tests won't build" or "I added the war plugin to the build.gradle and now SwaggerUI is broken." So maybe I see more than my fair share of "well shit, I guess I'll just spend the next three hours hunting down which magical combination of Jar version numbers will fix things" kind of problems. But damn. This shit didn't ever happen back when I was doing Python for a paycheck.

I don't use Java if I don't have to. If I have to use Java, I prefer to just use Servlets (mostly I do web development) and absolutely as few dependencies as I can possibly get away with. Fewer moving parts mean less that can break.

[–] Scoopta@programming.dev 6 points 1 month ago

You're talking about Java(Jakarta) EE, my comment is primarily targeted at Java SE. I find that the Java standard library on its own and core language is pretty nice if you use modern versions like Java 21. If I had to complain it'd be about checked exceptions, they annoy me but otherwise the language is fine. I've never worked with the full enterprise web stack, I use servelts for web and do a large amount of Java SE desktop development, not with swing, fuck swing. Primarily LWJGL and JavaFX. I love that language, more than most. At work I use a lot of C# and I hate it, I miss Java when I have to write C#. I just don't love it, mostly due to all the little annoyances and missing things(no labeled breaks, no diamond operator for generics, etc). I try to use Java for projects where I can but it's not always an option.

[–] Feyr@lemmy.world 5 points 1 month ago* (last edited 1 month ago) (1 children)

Yeah they almost fixed the need to compile and run with the exact same jdk version.

The rest still applies

[–] someonesmall@lemmy.ml 7 points 1 month ago (1 children)

You don't need to compile and run with the same jdk version. Dunno why you think this.

[–] Feyr@lemmy.world 4 points 1 month ago

Not now, not most of the time anyway. I did say mostly fixed

That was not the case back with Java 6 ish. Even massive breakage between minor releases was common. you had to tell everybody exactly which jre to use and possibly ship it with your software

[–] BlackPenguins@lemmy.world 17 points 1 month ago

I use a Java backend with a React frontend at work. It works fine with us and it's not going anywhere anytime soon.

[–] schnurrito@discuss.tchncs.de 13 points 1 month ago

"Can you program in Java?"

"Yes, if you pay for the plane ticket."

[–] Redkey@programming.dev 10 points 1 month ago (1 children)

I first learned about Java in the late 90s and it sounded fantastic. "Write once, run anywhere!" Great!

After I got past "Hello world!" and other simple text output tutorials, things took a turn for the worse. It seemed like if you wanted to do just about anything beyond producing text output with compile-time data (e.g. graphics, sound, file access), you needed to figure out what platform and which edition/version of Java your program was being run on, so you could import the right libraries and call the right functions with the right parameters. I guess that technically this was still "write once, run anywhere".

After that, I learned just enough Java to squeak past a university project that required it, then promptly forgot all of it.

I feel like Sun was trying to hit multiple moving targets at the same time, and failing to land a solid hit on any of them. They were laser-focused on portable binaries, but without standardized storage or multimedia APIs at a time when even low-powered devices were starting to come with those capabilities. I presume that things are better now, but I've never been tempted to have another look. Even just trying to get my machines set up to run other people's Java programs has been enough to keep me away.

[–] FuckBigTech347@lemmygrad.ml 6 points 1 month ago (2 children)

It doesn't help that they keep deprecating and changing standard stuff every other version. It's like they can't make up their mind and everything may be subject to change. Updating to the most recent release can suddenly cause 10s or 100s of compiler warnings/errors and things may no longer behave the same. Then you look up the new documentation and realize that you have to refactor a large part of the codebase because the "new way" is for whatever reason vastly different.

[–] JackbyDev@programming.dev 3 points 1 month ago

Can you give some examples? I'm my experience Java has been pretty easy to upgrade to new versions. 9 was a bit wacky but that was it. It's definitely been less of a headache than worrying about using Python 2 versus 3, for example.

[–] JaxNakamura@programming.dev 1 points 1 month ago

They made it free so they could sell courses and consultancy hours. Can't do that if it's all straightforward. It's the death star of complexity.

[–] Midnitte@beehaw.org 5 points 1 month ago (1 children)

Wonder if any of this worked nearly as trouble free as they implied it would.

[–] jawa21@lemmy.sdf.org 3 points 1 month ago

Java cards certainly did.

[–] supertinkers@sh.itjust.works 1 points 1 month ago

Is that dude with the boom box from Stargate?