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.
What I noticed right away was: It’s the ugliest hello world ever. It’s the slowest hello world ever. (For a long time it was also the record size hello world at something like 64MB, but that’s later and on a compiler.) And it doesn’t actually run on any platform except one: jre. And most binaries you find only run on one version of that one brand of jre.
Still, not the worst thing for writing web services in in late 90s. Doesn’t matter how slow it starts or how much space it takes. Responding to requests, being familiar to new programmers and living in a sandbox was enough.
Honestly modern Java has a lot of really nice features and I think it gets a lot of unfair hate
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™ 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.
Yeah they almost fixed the need to compile and run with the exact same jdk version.
The rest still applies
You don’t need to compile and run with the same jdk version. Dunno why you think this.
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
“Can you program in Java?”
“Yes, if you pay for the plane ticket.”
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.
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.
Holy shit! Can that be any more drawn out and boring?
It’s java. Extremely drawn out method names is it’s calling card.
One might even say it’s an ExtremelyDrawnOutMethodNamesFactoryImpl
… BeanAbstractBeanFactory
Java isn’t as verbose as Appkit/UIKit, I think. Take a look: https://developer.apple.com/documentation/uikit/nstextselectiondatasource https://developer.apple.com/documentation/appkit/nstextinputclient
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.
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
Lol. Two things can both be bad.
And slow startup times.
Whoa the disrespect. The way she threw away C++ haha
Also, the whole thing was next-level cringe