Live data from Hacker News

The Modern Java Platform – 2021 Edition

jamesward.com

31–40 of 259 posts

Re: The Modern Java Platform – 2021 Edition

#31
post #7

My biggest gripe with java is developer productivity. It has gotten better but is still far behind interpreted languages like Python and Ruby. Class hot loading and things like that have made it better, but if you change a method signature or interface you have to stop your process, recompile, redeploy, and restart. For big codebases it’s brutal compared to the aforementioned languages and their attendant frameworks.

That's interesting. I'm not the biggest Java fan, I can tolerate it. Recently working on a Python project I find I'm massively unproductive compared to something like Java or more specifically Scala as using Spark. Not having strong types and limited type hinting. I have no idea what things are, is it a int, string, object etc, clicking through in an IDE to see code/docs isn't as great as it's hard for an IDE to insp…

Types almost never save the day and they don't add much to the understanding. The code should be structured and documented in such a way that you are able to understand it, reason about it and swap implementations of stuff in the places where such flexibility is handy. E.g. in Clojure, I can trivially test my functions in the context of the application using the REPL. I don't have to reload anything, I do it right in the namespace I am modifying. I can also just look at the data there. Also Clojure is way more consistent and you can probably learn all the functions in clojure.core and some of the typical libraries by heart. These functions then work basically on anything you will do and are almost 100% transferable to ClojureScript.

For sysadmin-like tasks, for most stuff you can use Babashka, which is a limited Clojure + some frequently used libraries implementation with very fast startup thanks to GraalVM. For the rest, Python/ Perl etc. will probably still have a bit better standing because of all the libraries e.g. working with SNMP.

Re: The Modern Java Platform – 2021 Edition

#32
post #23
post #21

There's some great stuff on the JVM today, but Spring Boot is recapitulating all the problems of J2EE. Everything is extremely "decoupled" to the point that you have no idea where anything comes from or why, and just adding a new dependency to your classpath will radically change the behaviour of your application (oh, you added a dependency on a library that has a transitive dependency on the MongoDB client? Guess th…

This. I spent so much time this week chasing magic buttons in that over engineered piece of stink. I'd rather do raw HTTP servlets at this point.

There's always https://javalin.io/

Re: The Modern Java Platform – 2021 Edition

#33
post #21

There's some great stuff on the JVM today, but Spring Boot is recapitulating all the problems of J2EE. Everything is extremely "decoupled" to the point that you have no idea where anything comes from or why, and just adding a new dependency to your classpath will radically change the behaviour of your application (oh, you added a dependency on a library that has a transitive dependency on the MongoDB client? Guess th…

Totally agree, why i use https://www.dropwizard.io/en/latest/ with guice, generally waaayyy more explicit about whats going on

Re: The Modern Java Platform – 2021 Edition

#34
post #7

My biggest gripe with java is developer productivity. It has gotten better but is still far behind interpreted languages like Python and Ruby. Class hot loading and things like that have made it better, but if you change a method signature or interface you have to stop your process, recompile, redeploy, and restart. For big codebases it’s brutal compared to the aforementioned languages and their attendant frameworks.

With interpreted languages you pay the price in terms of productivity (best practices, design patterns), performance (at scale) in long run which is way more than what you gain in short term is my opinion.

Re: The Modern Java Platform – 2021 Edition

#35

Earlier quoted context omitted.

You do realize the paradigm shift that enable language polyglotism? It is nothing like WORA

I'm not sure I do. Isn't polyglotism about being able to write in different languages, and Java VM making that possible?

WORA is about coding in one language and running the code in any OS/hardware.

Openjdk is one of the only language VM to support multiple languages (with coreclr).

However the languages that compile to bytecode are not automatically interoperable between each other. Usually languages (scala, groovy, etc) have partial interoperability with Java and almost zero interop between each other (scala kotlin, kotlin groovy). Kotlin stands out by being the only language truly seamlessly compatible with Java.

However graalvm is next generation because it enable languages to become easily and seamlessly interoperable with ALL other platforms languages at once. Graalvm is also revolutionary for its productivity (its a framework for building languages) and for its easy to get performance.

Re: The Modern Java Platform – 2021 Edition

#36
post #25
post #7

My biggest gripe with java is developer productivity. It has gotten better but is still far behind interpreted languages like Python and Ruby. Class hot loading and things like that have made it better, but if you change a method signature or interface you have to stop your process, recompile, redeploy, and restart. For big codebases it’s brutal compared to the aforementioned languages and their attendant frameworks.

If your development productivity is entirely reliant on how quickly you can reload your changes, then you're doing something wrong. Though I guess you'd have to write mounds of unit tests and constantly rerun them to prevent common issues that Java's type system solves for free.

Actually, Java, its syntax, the explicit types and how its often taught only obscure the solutions that could be much more obvious. Since I have seen Clojure, I was swearing why nobody has shown it to us right in the beginning when I was in the university. Back then, Clojure was already an established, stable language and that has been a decade. I could just skip the C, Java and other classes and would be a much better real-world problem solver/ engineer much earlier. If I needed the specifics e.g. for embedded or legacy applications, I could always look-up/ learn the details for C/ Java etc. but that is not needed for more than 95% of the tasks a software engineer would encounter in the real world.

Re: The Modern Java Platform – 2021 Edition

#37
Quarkus (and its dependent techs) has been in my radar for a while, and recently I've started using it, and I must say I'm impressed.

Code in modern Java (lamba etc) -> build native Linux exe -> package as Docker image -> deploy in Google Cloud Run. All wiring from CLI so CI/CD friendly (next is to use Google Cloud Build). Since it's native, memory usage small and boot time negligible. Since it's managed, it auto-scales (up and down, to zero cost).

My complaints:

* Quarkus is very opinionated. I'm used to this coming from Google App Engine.

* Building _native_ exe is slow. Like 1995 Java slow.

* Scala support is limited.

If you're used to App Engine, you know exactly the dream I'm living in. Without App Engine's limitations.

Re: The Modern Java Platform – 2021 Edition

#38

Earlier quoted context omitted.

That's interesting. I'm not the biggest Java fan, I can tolerate it. Recently working on a Python project I find I'm massively unproductive compared to something like Java or more specifically Scala as using Spark. Not having strong types and limited type hinting. I have no idea what things are, is it a int, string, object etc, clicking through in an IDE to see code/docs isn't as great as it's hard for an IDE to insp…

Types almost never save the day and they don't add much to the understanding. The code should be structured and documented in such a way that you are able to understand it, reason about it and swap implementations of stuff in the places where such flexibility is handy. E.g. in Clojure, I can trivially test my functions in the context of the application using the REPL. I don't have to reload anything, I do it right in…

That's strongly dependent on how big the code base is.

I'm a huge python fan, and I don't like/use IDEs on my personal projects. But eventually I still gravitated towards typescript because it had typing and the compiler + unit tests giving me a huge boost in ability to extend my project beyond a certain size.

I think the threshold is around 50-100 files, but smaller code bases also benefits from the typing structure.

Re: The Modern Java Platform – 2021 Edition

#39
post #21

There's some great stuff on the JVM today, but Spring Boot is recapitulating all the problems of J2EE. Everything is extremely "decoupled" to the point that you have no idea where anything comes from or why, and just adding a new dependency to your classpath will radically change the behaviour of your application (oh, you added a dependency on a library that has a transitive dependency on the MongoDB client? Guess th…

I first used Spring while doing an internship in 2007. I remember writing about bunch of XML bean configuration and wondering.... why???

Sounds like the ecosystem didn’t get much better.

Re: The Modern Java Platform – 2021 Edition

#40

Go? Archaic? I suppose you are referring to the paradigm it employs...

Maybe the author isn't a fan of explicit pointers? Because yeah, though it's obviously c-like (as is Java), I can't think of anything else one might consider archaic that isn't also in the java language or virtual machine.
Post reply on HN