back in my day we only had one language. it was called ASSEMBLY. wanted to make the computer do something? you had to ask it yourself. and that worked JUST FINE
Well la-tee-da, fuck my AND gates and inverters.
Look at moneybags over here with his instruction sets.
Back in my day when you wanted a computer to do something, you just asked her to do it and then underpaid her because women can’t hold real jobs.
Gates and inverters!!?
Luxury!
In my day we had to use transitors and resistors and, if we were lucky, maybe capacitors.
Look at me, I have a friend at bell labs.
We had to use vacuum tubes, and we liked it.
Back in my dsy we only had non programmable computers. Wanted to make the computer do something? You had to specifically build in the function. And that worked JUST FINE
Back in my day we had an abacus and if you wanted it to do something you had to do it your damn self. And that worked JUST FINE.
Oh hello mister fancy pants with your abacus. We carved notches in rocks and we were happy with that.
Java is great if you actually want to earn a living.
You’re not wrong, it’s still a staple today, but it lost a lot of its shine a while ago. They are mimicking “new” features introduced in other languages, but make a point to preserve retrocompatibility.
I can’t imagine how convoluted the JVM has become in the last 10 years.
I don’t really see how that is bad…? Java wants to be widely applicable and taking the best features from other languages helps that goal, right?
C++ fanboys will talk a bunch of shit about Java for this, but c++ has been doing this same shit (and more poorly) pretty much since its inception.
And most of the newer Java stuff is syntactic sugar, so I’m not sure why that commenter is calling out JVM implementations. I’m guessing they don’t know much about the JVM, since you can compile these higher level syntax tricks down into bytecode just like you might compile more verbose source code.
Static analysis of compiled code with javap might be more difficult, but I’m betting the commenter doesn’t know what that is either.
Because Java sucks at taking those features. I mean look at Java’s Optional abomination of a class and compare it to C# or Typescript’s optional chaining (
?.
) language feature.There’s a reason Kotlin was created, because Java is still bogged down by all its legacy kruft.
It still boggles my mind that C# is as good as it is given where it comes from. Java really fucked up with type erasure and never fully recovered imo.
True, but functional languages are great if you want to live comfortably.
https://survey.stackoverflow.co/2023/#section-salary-salary-and-experience-by-language
Difficulty of finding such a job not shown.
Could you have picked any creepier clown foto? Lol
That’s almost comically besides the point of the comment.
One project I worked on had 10 different languages. That was rough. But even your basic full stack web application is usually 5 languages: SQL, a backend language, HTML, CSS and JS. Usually some wheel reinventing frameworks thrown in for good measure. 5 languages is light these days.
And don’t forget the CI “language” plus a bunch of bash scripts, Helm, Kubernetes, etc.
Probably a bunch of hacked together Python to copy stuff between fileshares. Bonus points if it runs with a .bat file and a Windows scheduled task.
Skip step 3, and just switch to Kotlin. Worked wonders for Android
Yes indeed, and it feels really good.
Is Kotlin bad?
Kotlin is Java with all the suck taken out.
It’s a modern, ergonomic language that runs on the JVM and removes as much GD boilerplate as it can.
It’s fantastic.
with all the suck taken out.
You still need Gradle, so not all the suck.
https://kotlinlang.org/docs/maven.html That’s not true, you can use Maven if you want!
I’m not a huge fan of Maven either. I guess I’m just spoiled by Cargo.
Cargo is really simple, which is great, but also limiting. Maven is much more complex, but for good reason - there’s use cases, especially around multi-artifact projects and version sharing, where cargo would require either some glue or you run into some interesting edge cases. Usually, Rust isn’t used for the kinds of big, wacky projects with a million dependencies that companies write in Java/Kotlin, so those kinds of use cases are considered more unusual.
Gradle, in my opinion, makes itself complex because it’s all code, is very brittle, and several of its features just don’t work right and require workarounds. When it works, it builds fast and it works well, but getting it to work, and how often you have to get it to work again…not worth it.
That’s interesting, thanks
And one of them is Java?
Yes Java, Scala, Kotlin, Jython and Perl
Whatever you do in perl, I can do in PL/SQL.
I would rather use pgsql or tsql instead of PL/SQL, mostly because of oracle.
Of course Perl is in there lol
What about Groovy?
Forgot about that one, even if I just worked on a Jenkins script 🙄
Just use Kotlin
The python code we inherited had some performance issues. One of the guys was like “we should rewrite this in Java”.
Luckily the boss was not an insane person and shut that down. The issue was an entirely stupid “…and then we do one query per project” behavior that worked fine when the company was small but unsurprisingly started to suck as users created more projects.
Instead of a months long complete rewrite, we had a two hour “let’s add profiling… Oh wow that’s a lot of queries” session.
My favorite is “Java is slow” said by someone advocating for a language that’s at least 10 times slower.
Those who say such things are straight ignorant
They’re basically fashion victims.
I wouldn’t say so. They are inexperienced. They don’t know where the bottleneck of most of the modern software is (it’s io in 80-90% of cases) and how to optimize software without rewriting it to C++
How are they ignorant? It’s a known fact that java is slow, at least slower than some others. Sure, it’s still fast enough for 95% of use cases, but most code will run faster if written in, say, C. Will have 10x the amount of code and twice as many bugs though.
Java is indeed slower than C, Rust, in some cases than Go.
But that doesn’t mean that
code will run faster if written in, say, C
Again, like 80-90% of production code are bounded by disk/network io operations. You will gain performance from using C in embedded systems and in heavy calculations (games, trading, simulations) only.
Which is exaxtly what I said, that it’s fast enough for most use cases.
In theory though, you will “gain performance” by rewriting it (well) in C for literally anything. Even if it’s disk/io, the actual time spent in your code will be lower, while the time spent in kernel mode will be just as long.
For example, you are running a server which reads files and returns data based on said files. The act of reading the file won’t be much faster, but if written in C, your parsers and actual logic behind what to do with the file will be.
But it’s as you said, this actual tiny performance gain isn’t worth it over development/resource cost most of the time.
the jvm brings enough bugs to outweigh any benefits there…
it is relatively fast, but it’s slow in that it takes up a bunch of resources that could be doing other things…the jvm brings enough bugs to outweigh any benefits there…
Please name a few
i decline your invite to debate the merits of java and jvm… i will instead walk my dog through this beautiful park here…
but, it’s all been said on top level comments on this post.
it’s trash, and honestly, even if it was perfect, sun microsystems has ruined any potential benefits.Have a good walk at least
takes up a bunch of resources that could be doing other things…
You cannot get rid of garbage collectors, but you can always compile your java into binary to reduce the memory footprint.
sea lion
My favourite is “all the boilerplate” then they come up with go’s error checking where you repeat the same three lines after every function call so that 60% of your code is the same lines orlf error checking over and over
And god help you if you forget those 3 lines somewhere and you silently have database failures or something else.
Yeah, that’s the other thing - it does become easier to accidentally fail to deal with errors and the go adherents say they do all of that verbose BS to make error handling more robust. I actually like go, but there’s so much BS with ignoring the pain points in the language.
When you handle all your errs the same way, I’d say you’re doing something wrong. You can build some pretty strong err trace wrapping errs. I also think it’s more readable than the average try catch block.
You still need to add error handling to every call to every function that might raise an error
Things like lombok make the boilerplate less of an issue in modern Java too
Java is great, the way its (ab)used is terrible.
The XKCD Standards comic writ large. There are 17 competing standards. -> “Hey, we should make a standard to unite all these disparate standards.” -> There are now 18 competing standards.
This is super easy, you just fire all the Java devs and hire real engineers.
Obligatory XKCD:
Write your business critical process in brainfuck and have job security for life.
we should use only the best language for everything.
Codebase is now 30 languages
there aren’t 30 best languages, that’s not how “best” works. we use only the best language. for everything.
That’s exactly how “best” works. Everyone thinks their language is the greatest and shits on everything else. If they all chose “the best” there would be 50 of them. Opinions are like assholes. Everyone has one.
too bad everyone else is wrong
Lol Principal Skinner meme
If only it was intentional…
yeah if only I was joking. wouldn’t that be funny