Live data from Hacker News

Ask HN: What is a modern Java environment?

news.ycombinator.com

21–30 of 153 posts

Re: Ask HN: What is a modern Java environment?

#22
post #15

* Use SDKMan for runtime and sdk management https://sdkman.io/ * Try to use Kotlin where allowed (Maybe unpopular and bad faith response given that you asked about Java, but I don't care -- kotlin's Java interop is way more seamless than Scala or Clojure to the point that its often not even noticable) https://kotlinlang.org/ * IntelliJ * Spring is pretty popular, I've seen a lot of people using Vertx * Square librari…

> Try to use Kotlin where allowed If you want a slow build and code that is fun to write but hell to read, that is good advice. > Use kotlinscript as the config language Extremely slow, that is.

I disagree that it's easier to write than read. I tend to think Kotlin is much easier to read than java but harder to write because it tries to enforce good Java patterns at a language level.

I agree that these will slow down your build, but not significantly, and at the benefit of developer comfort to make changes. Incremental compilation largely erases these slowdowns.

Re: Ask HN: What is a modern Java environment?

#23

The stack I've seen, used and liked at many clients is: Spring Boot, Kotlin, IntelliJ. Which of course means all the old discussions: Jetty/Tomcat/JBoss/GlassFish, GSON/Jackson, Hikari/C3PO/etc, etc are now mostly moot, since most just use the Boot defaults until they need something else. Kinda nice, actually. Less bikeshedding, can get a project up and running without taking a stand on all these things. Most clients…

Can confirm this is my stack at a fortune 500 web/entertainment company.

Re: Ask HN: What is a modern Java environment?

#24
post #7
post #5

IntelliJ Idea for sure.

I am using it now because the team is using it, but cant figure out in which way it is supposed to be better then Eclipse. It looks somehow better, but it seems strictly inferior in terms of what it does for me.

It costs money, so it is a value statement about you as a developer. Either you are "worth it for your employer", or you are "worth it for yourself".

(I personally still use Eclipse)

Re: Ask HN: What is a modern Java environment?

#25
Spring Boot wrapped in a Docker container and a frontend written in JS using React, Angular or similar.

So maybe the frontend and deployment has changed. The rest probably not so much.

Java versions 8 and 11 are by far the most common.

Lambdas were introduced in version 8.

Re: Ask HN: What is a modern Java environment?

#27
post #7
post #5

IntelliJ Idea for sure.

I am using it now because the team is using it, but cant figure out in which way it is supposed to be better then Eclipse. It looks somehow better, but it seems strictly inferior in terms of what it does for me.

I find both mysteriously stop working on a project for a while so I keep them both. Eclipse has far better refactoring. IntelliJ refactors text files that are not Java and can easily break stuff when eclipse refactors are always safe. IntelliJ updates text strings but it's not always correct in doing so, é. G. A comment that says "_don't_ use a.b.C" might get refactored. In eclipse you can often safley "code backwards" i.e. break an API and then fix all the red dots, usually with auto fix options. IntelliJ misses a lot of necessary fixes until you compile. That can add hours of work to a big change.

Re: Ask HN: What is a modern Java environment?

#28
post #7
post #5

IntelliJ Idea for sure.

I am using it now because the team is using it, but cant figure out in which way it is supposed to be better then Eclipse. It looks somehow better, but it seems strictly inferior in terms of what it does for me.

I'm very curious to hear what Eclipse does that IntelliJ does not match.

Re: Ask HN: What is a modern Java environment?

#30
post #7

Earlier quoted context omitted.

I am using it now because the team is using it, but cant figure out in which way it is supposed to be better then Eclipse. It looks somehow better, but it seems strictly inferior in terms of what it does for me.

And what are the functions that you use that work better in Eclipse?

Eclipse immediately tells you what is broken when you change an api. IntelliJ does not.

You can't stop IntelliJ from saving work. I like to kick of a build, and work on some new stuff while it's going on without saving until the build completes. That workflow is impossible in IntelliJ. You have to down tools, for a long build with lots of tests that can make IntelliJ slower over all. IntelliJ generally more responsive for most work, but that's because it's not using Java's type system to find errors as you work, errors are deferred, which often means they take longer over all to fix.

Post reply on HN