Live data from Hacker News

The Modern Java Platform – 2021 Edition

jamesward.com

131–140 of 259 posts

Re: The Modern Java Platform – 2021 Edition

#131
post #123
post #98

Earlier quoted context omitted.

I've never seen or heard anyone major use GraalVM in production. I only hear Oracle and a small bunch of other folks hyping it. Tech also lives on hype and a long time until a tech reaches a critical mass is generally a band indicator (i.e. if something doesn't reach the mainstream in less than N years, it never will). There are some exceptions (Ruby took off after Rails was launched, Python was adopted by Linux dist…

Twitter runs graal in production.

Also Facebook

https://mobile.twitter.com/FFarquet/status/13657007170513141...

Re: The Modern Java Platform – 2021 Edition

#132
post #74

Earlier quoted context omitted.

Enterprise apps are complex because they don't focus on solving the business problem, they focus on the tools and frameworks. Spring is not the cure, it's the disease.

Enterprise apps are super complex, frequently a lot more complex than startup apps. Someone basically comes with 1 thick tome worth of business knowledge plus 1 thick tome worth of legal restrictions and you're supposed to codify all of that, to the letter, in software. Some of the business logic can make you cry. Software dev: "But that's not clean/elegant". Business owner: "Reality doesn't care about elegant/clean,…

I'm sorry, having extensive experience writing enterprise apps I have to refute this. Almost all complexity I've ever seen was rooted in infrastructure, not the inherent complexities of said enterprise.

I would even go so far as to say that the enterprise logic was so straight-forward that most programmers spent their time inventing problems, which is how look at the enterprise market. They's a lot of "inner platforms", meta-problem solving and needlessly complex deployment environments.

Contrast this with my current industry, gaming. Here the problems are real, tangible and hard. Suddenly overcomplication is much less of a problem, because the extra cognitive load becomes too much when your core problem is already hard.

Re: The Modern Java Platform – 2021 Edition

#133

Earlier quoted context omitted.

That`s not spring boot, that`s whole spring (and google guice, etc), starting from the idiotic XML for bean wiring, to equally idiotic anntations, and finally, after 15 or how many years, they realized that plain java can be used for object creation. What a discovery! Still, they introduced @Configuration bullshit, etc. (There are cases when such features may be useful, e. g. systems that are extended by 3rd party pl…

This is true in most languages really. It starts with people just wanting to speed up their development by turning common tasks into some macro, or annotation, or even library. But where does it end? It ends in a convoluted mess of dependencies, weird syntax, and hopeless stack traces. So much work can be done with plain old Java. Or plain old JavaScript. Or plain old C + stdlib.

Agreed. Setting up Springs OAuth Client was so complicated and getting the configuration right was taking so much time. I replaced it with a simple Filter that just did the query itself. It easy to go to that filter and add whatever security logic you want (at least for me it is).

There is a balance here that might be hard to get right. Spring and other frameworks make things easier until they dont. At some point it might be easier to just write code instead of configuring your way through these frameworks. Many times I rather write code then go configuration hunting.

What I do like about Spring is that they offer a lot of hooks and interception points to overwrite with your own logic.

Re: The Modern Java Platform – 2021 Edition

#134
post #75

Earlier quoted context omitted.

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.

Why does Go need explicit pointers?

It’s less about need and more that it’s a feature to help you more easily understand your memory allocations and when you are getting a reference to something vs a copy

Re: The Modern Java Platform – 2021 Edition

#135

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

Author here. Yeah, the Go language feels very archaic when using more modern languages. Some things I miss when I use Go: immutability as a default, monadic error handling, type classes, higher-kinded types, high-level collection operations (map, flatmap, filter, etc), ADTs, extensive pattern matching, expression-orientedness, and explicit null handling.

Guess that’s why kubernetes and so many other CNCF projects were written in Go.

It’s archaic enough that everyone can get things done instead of worrying about esoteric new features.

Re: The Modern Java Platform – 2021 Edition

#136

People are critical of Spring because they have seen it in production and in practical projects. And fall in the naive trap that somehow the tools and the libraries are the reasons why a real-life software project is messy. However Spring is something that has stood the test of time and is used in thousands of actual projects. And Spring itself emerge out of practical software development with plenty of competing alt…

I'm not critical of spring because real life software projects are messy. I'm critical because I rarely if ever do greenfield development and when I'm debugging a production exception caused by something that Java's type system was perfectly capable of treating as a compile time error that is suddenly a runtime error I'm a little bit sad. And the sheer frequency that I encounter them indicates that just getting more disciplined developers isn't really a solution here.

Re: The Modern Java Platform – 2021 Edition

#137
post #107

Earlier quoted context omitted.

Conditional break points are definitely a great secret weapon. But don't underestimate the value of the humble print statement. It's convenient and can often lead to surprising insights "hmm, why is this getting printed so damned much?" in a way that is sometimes more accessible than a debugger.

This right here, print statement debugging gets far more of a bad name than it deserves. If that's a developers only tool then sure that's a problem, but no need to hate on a very simple and effective technique just because it's often the only one people know when they are starting out.

Print debugging results in a printed log of this happened, then this happened, ..., and finally this happened. And you can trivially rewind it and do random looks at the log. Debuggers have difficulty giving you this much context at your fingertips. The downside is that if you missed one of those critical "this happened" items in your log you have to rerun. But debuggers have the same problem. If you missed a breakpoint you have to re-run.

Re: The Modern Java Platform – 2021 Edition

#138
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 read a comment once, saying that Spring is a lot like the COMEFROM statement [0]. You are in a class, but you have no idea how you got there, or how to get somewhere else. Your IDE is no help, because everything is "decoupled".

[0] https://en.wikipedia.org/wiki/COMEFROM

Re: The Modern Java Platform – 2021 Edition

#139
post #23

Earlier quoted context omitted.

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.

Plain servlets, jetty, haproxy for TLS, jstl, postgres, apache dbcp. Add in whatever specialty libraries for the project and you can pull away with 1/100th of the dependencies.

I built a blog engine that almost has that stack (Payara instead of jetty, apache dbcp).

Re: The Modern Java Platform – 2021 Edition

#140
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 swear I'm going to add a bitcoin miner to my libraries and list it in spring.factories

That will be great service to this world. Considering endless turds Spring/Boot generates at runtime, bitcoin mining might most ethical thing to do.

Post reply on HN