←back to thread

257 points pmig | 5 comments | | HN request time: 0s | source
Show context
time4tea ◴[] No.43099396[source]
The jvm is a pretty insane beast. It will do usage based recompilation, escape analysis for memory, so non heap allocation is super fast, has great memory safety... But a lot of people use it with spring/spring boot, a technology designed to work around the complexities of a particular type of middleware software in the late 90s and early 2000s. It's cargo cult programming of the highest order. In the OP, the author is comparing apples with oranges, with a bit of misunderstanding that java/jvm means spring boot, and while that is true for a lot of people and certainly a lot of stuff on the internet implies that 'this is the way', it's not required. Startup times of ~100ms are absolutely standard for a big program, similarly unit tests taking 1ms. I prefer to write kotlin rather than java, as it's a nicer language ,IMHO, but still those bytecodes run on Jvm and same stuff applies.

Edit: im not advocating writing 'ls' in java, and I would also agree that java uses more memory for small programs, so its not a systems programming language probably.

Just use new() it's pretty fast.

replies(12): >>43099426 #>>43099935 #>>43100071 #>>43100330 #>>43100562 #>>43101034 #>>43101071 #>>43101189 #>>43101914 #>>43102326 #>>43102666 #>>43143349 #
okeuro49 ◴[] No.43099935[source]
> But a lot of people use it with spring/spring boot, a technology designed to work around the complexities of a particular type of middleware...

No, people use it because we don't want to reinvent the wheel.

Spring is well documented and Spring Boot gives you a set of dependencies that all work together.

Then you don't have to spend time messing around with things like OAuth and authentication, you can just write the application.

replies(5): >>43100066 #>>43100145 #>>43100618 #>>43100650 #>>43112249 #
optician_owl ◴[] No.43100145[source]
> Spring Boot gives you a set of dependencies that all work together.

But spring boot deps is infamous meme.

> Then you don't have to spend time messing around with things like OAuth and authentication

Yeah. The funny thing is reality is quite complicated and spring supports a lot of (almost) documented cases. But 99% javaspring developers do not care. I met quite a lot of experienced devs and only 2 of them know how to optimize application start or which errors Kafka wrapper would not retry and so on. Half of the non-default situations are solved via reinventing the wheel because of a lack of understanding of nuances. I can't say people are dumb, many of those devs are smart. I tend to say that ultra-framework kills people's expertise and in the long term hardly saves resources.

replies(1): >>43100612 #
okeuro49 ◴[] No.43100612{3}[source]
> I tend to say that ultra-framework kills people's expertise and in the long term hardly saves resources.

You can use as much of Spring or as little as you want. Don't want Hibernate? Use JDBC template.

I have noticed that people who don't use a framework, just end up inventing their own bespoke framework, which unlike Spring, is not documented and has no help available online.

replies(1): >>43100792 #
1. nprateem ◴[] No.43100792{4}[source]
It's a paradox as old as time itself.

Otherwise intelligent devs assume they can do a better job without all the "complication" and "bloat", but then just end up with homegrown unmaintainable crap that does half of what the frameworks offer for significantly more effort.

It's either stupidity or arrogance.

replies(4): >>43100998 #>>43101385 #>>43102188 #>>43105175 #
2. optician_owl ◴[] No.43100998[source]
> all the "complication" and "bloat", but then just end up with homegrown unmaintainable crap that does half of what the frameworks offer for significantly more effort.

I don't see how you deduct the conclusion of reinventing wheels is the only solution of overcomplex and far from ideal frameworks. But you can categorise this deduction also.

3. okeuro49 ◴[] No.43101385[source]
So many times I have had to deal with custom "frameworks". I've become jaded.

At least with Spring, you only have to learn it once.

4. gorjusborg ◴[] No.43102188[source]
Why not both?

The trouble now it is that Spring Boot allows getting things up and running without having to know anything about what is underneath.

That is great, until you have to change the way it behaves.

5. geodel ◴[] No.43105175[source]
Agree. I have seen same thing where many people maintain a home grown crap called kitchen and think they can do better job than getting ready meal from restaurant.

Developers should not be writing code. Period.

Stupidity and arrogance is ruling everywhere.