Hacker News new | ask | show | jobs
by ldjkfkdsjnv 1105 days ago
After a decade of programming 50+ hours a week in many languages (typescript, javascript, python, scala, java, lua, bash, c++, etc), I have come to the conclusion that Java is simply the best. The tooling, libraries, stability, verbose rigidity. It forces a style of programming that simply scales to more engineers better
5 comments

As an end user though, I honestly can’t think of any Java software I actually enjoy using. Minecraft? That’s literally the only thing that comes to mind.
This was true for me as well until I used DBeaver (a universal database browser tool) I only realized it was java after I tried connecting to a really old server that needed me to change my ssl settings in the JRE. The user interface feels fairly snappy. DBeaver is a really fantastic tool and I don't see myself changing any time soon. It even supports making its own SSH tunnels to your database server using your local ssh agent.

I can attest that AWT and Swing were hot garbage 20 years ago, though. The cross-platform aspect worked great, but the algorithms weren't worth making cross-platform to begin with. It was basically a giant GUI ecosystem written by people with no understanding of how to implement graphics efficiently. My favorite was how they bragged about their "lightweight" visual components that don't require OS-level window objects. Except, OS window objects are part of an algorithm that tracks exposure regions and repaints it efficiently without needing to redraw the whole screen. Swing took the approach of repainting the entire application window in a back-buffer on every visual change and then copying that up to the entire application window area, even for things as small as tooltip pop-ups or menus.

I haven't checked which GUI framework DBeaver is using. I suppose it's possible that it is Swing and my workstation is just so fast these days that the inefficiency doesn't matter.

I think you just don’t realize when a given software is Java. I personally really like intellij, one might say it is “bloated” (though I hate that word), but that’s only because of indexing everything, not due to java itself.

On the server front many cloud infrastructures themselves, apple servers, pretty much every top 500 company has some form of business critical infrastructure chugging along on top of the JVM happily.

Oh no, I realize what software I use is Java. Swing feels bad to use. On my workstation at least, JetBrains IDEs are slow, I haven’t used it in a long time, but Eclipse was slow, NetBeans was slow, there’s an enterprisey Java web start application I need to use at work and that’s slow. Like I said, Minecraft is the only piece of software written in Java that I enjoyed using.
I think java is geared towards server applications because the JRE is so finicky about memory and other machine level details you can only control on your own services

Most major web services have java microservices that take on the performance critical and logic intensive parts of the business

Have you tried Jetbrains stuff?
I have. Maybe I don’t have enough RAM for it, but I find their IDEs to be slow and laggy.

Xcode and Visual Studio Code feel so much snappier on the same machine.

Take some time to learn the navigation and refactoring abilities of the JetBrains family. It is IMHO unmatched by most. Using almost any other IDE feels like a downgrade, especially on large codebases with complex dependencies. Beyond Java, they have excellent support for Python, C#, Go, Javascript, and more. The engine builds a deep understanding of your code, which can make ctrl-space to suggest a method on an object feel delightful (and a Godsend on big Java names).

I also strongly prefer the keyboard shortcut set JetBrains uses. Having to reach all the way up to my function keys for combo operations makes me sad; even when I use other IDEs I love using an Intellij keybinding when available to quickly jump in and be efficient.

But to your point, I also tend to use it on higher end workstations (i.e. minimum of 16GB RAM, local repo pulls on fast SSDs, tons of logical cores, etc.).

Used JetBrains for more than 10 years, but got tired of it lagging all the time and using so much memory (even on M1 Pro with 32GB RAM, even on small projects). So I switched to VSCode for everything except Java. And I’m not a person who is easily annoyed I would say.
They seem to have fixed a lot of the weird lags recently. Right click context menu used to be slow, and the python debugger had performance issues for sure up to a year or so ago. Both way better now
I used VSCode for JS for a while, until a major refactor, the experience was awful and I switched to Intellij. I love it and never going back.
I find it very weird that Xcode is faster than... anything, really
It may be faster than.. visual studio.
It IS faster than JetBrains, at least on my machine.
They limit the usable memory way too low by default — if you have RAM increase it to at least 2GB, but 4 may be even better and it will be snappy as hell.
Android apps are full of Java.
I was an Android user for years, iOS and most native iOS apps feel more performant and less laggy to me.
Java doesn’t enforce any particular style. I’ve seen extremely procedural code that is full of statics where it’s obvious the authors were attempting to write C in Java. I’ve seen all manner of attempts at OOP where classes were meticulously restricted to nouns and the opposite where every class was a Service/Verb. Of late I’ve seen Java server side code that’s drank the reactive kool aid and done it’s level best to recreate NodeJS in Java.

Now, your assertion about scaling to more engineers may be true but I’d argue tooling is the main reason for this because Java certainly doesn’t enforce any particular style of programming.

Have you tried C#? It looks a lot nicer to work with than Java.
I'm using C# and Java professionally. I've been using for a long time while I'm newish on C#. Also I'm on a older version of .net vs. a modern Java. Honestly to me the language doesn't feel that great. It always feels sluggish, to work with, like I'm fighting against the language. And then there is the ecosystem, Spring Boot is just such a breeze to get a web app running with all the integrations you could ever want being just there. Add in Lombok and Apache commons and it's a real pleasure to develop in Java for me.
The ecosystem is nowhere near as mature though. I don’t work with either anymore but back in 2017 I made the switch from C# to Java and it felt like a breath of fresh air when it came to the maturity and capability of JVM tooling compared to what’s available for .NET.
Try JetBrains Rider, and be sure you are using a recent flavor of dotnet. When I migrated past 4.x to 6 of the .Net ecosystem, it dramatically improved my ability to work and deploy in C# with their rather delightful build system.

For example, in the Monogame game library, you can build a self contained binary for Windows, Linux or MacOSX nearly effortlessly with just a single command line.

But these executables are quite huge, are they not?
Could it be any worse than an Electron application?
The dotnet ecosystem is incredibly mature. Its as old as java in most tooling cases, IDE, Language, Build System etc. The runtime is the newish part.
The ecosystem is certainly more mature than many smaller languages, but it is still in a different league than Java’s. Most of it is not too great copies of the corresponding Java library, often being made by Microsoft only, with plenty of paid options while in the java world all of it is open-source and free, while offering a much wider selection.

Also, you will find a java library for that random new tech you want to use, while it is likely missing for .NET.

I'm curious, what kind of tooling are we talking about?
Interesting. Did you try Jetbrains Rider as an IDE?
https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...

On a more serious note, most Java code on Github is now written by Copilot.

In javaland, the actual ideal is somewhere in the feature set supported by Groovy. CompileStatic groovy is probably the best, you get a lot of good features for no performance hit.