Live data from Hacker News

Ask HN: What is a modern Java environment?

news.ycombinator.com

121–130 of 153 posts

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

#121
Spring Boot (embedded Tomcat/Jetty/Netty)

Lombok

Gradle, Guava

JUnit 5, testcontainers, WireMock

Logback, Slf4j

Okhttp, Open Feign, RestTemplate

Micrometer

OpenApi, swagger

Liquidbase, jooq - db stuff

This is your run of the mill stack

Dropwizard, Vert.X seem to be less used nowadays, Spring has mostly won the show

Heard people using Kotlin, Quarkus, Micronaut but that's niche stuff

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

#122
post #82

Here is what we use and I'd recommend to others. The most common: - Kotlin for most of the backend code, but Java for shared libs. We still use Java 8 for some libs which may be used in Android, that's an unfortunate reality - Gradle for build config - Spring for application architecture And few things that may significantly improve your dev process, but are not so common: - Spring Reactor (and Webflux) for processin…

> Kotlin for most of the backend code, but Java for shared libs. We still use Java 8 for some libs which may be used in Android, that's an unfortunate reality

Considering Kotlin is a supported, first-class language on Android, why not write your shared libs in Kotlin as well?

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

#123

I'll chime in my opinion: Java is getting something right that I don't see much elsewhere: Dependency Injection. Combine this with a mocking framework and you can write _actual_ isolated unit tests for every single part of your stack. We're fans of CDI, it's a more polished Spring framework without the legacy weight. We're developing in Quarkus, MicroProfile, and bigger monoliths in Apache TomEE. We use ActiveMQ exte…

I prefer to skip the mocking frameworks and rely on Interfaces instead. My unit tests create anonymous inner classes that are passed to the constructors.

If it takes too much effort to write that anonymous inner class, then the Interface may be too big and need broken up. Or maybe you're hiding too much state and need to rethink the API.

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

#124

Personally, after the log4j fiasco, I wouldn't touch Java. The standard ecosystem setup is to use all the major 3p libraries for all your functionality (Jaxrs, swagger, log4j, jersey, e.t.c) While this generally works, the ecosystem is full of holes (like log4j), and crappy behavior. You get things like "javax.ws.rs.ProcessingException: Already connected", exceptions which mask underlying issues like not being able t…

Pythons indentation errors and complete lack of variable types make it a kids scripting language at best. It is only useful for quickly cleaning data up for clock watchers at Mega Corp XYZ and its libraries like scikit learn which are kinda cool but it's best to link some python scripts and do everything else as a Java project. Data science cleaners / janitors are usually very limited energy wise from fapping and have that cuck squarish personality thing going on so they like pythons lazy approach to coding.

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

#125
post #34

Earlier quoted context omitted.

Extension methods? Aliases? Countless more features that are designed to make your code hard to read & understand. Build scripts are generally written once and executed hundreds or thousands of times. It makes far more sense to optimize their performance rather than ease of writing.

It's okay to have a different opinion, but personally I'd never work at a place that did that. Java is already on thin ice and this is simply how I tolerate it and how I've seen successful java teams operate in cloud environments. If you are really seeing dramatic build times, I don't blame you for investigating them, but I'm not going to forgo years of DX improvements just because I heard on the internet one time th…

Java is the COBOL of the 21st century, in both the best and worst sense.

Java stacks will be running major companies long after everyone posting in HN today is dead and gone.

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

#126
post #78
post #33

Earlier quoted context omitted.

Netbeans was really great, maybe still is, but the noise jetbrains made with the astroturfing advertizing has jetbrains dominating everything. IMHO Netbeans was ahead of idea in many ways. But since they didn't buy commenteers to hype their product it's pretty much nowhere, at least I don't know anyone who uses it.

I'm someone who has regularly recommends Jetbrains software (including IntelliJ and Resharper) to others in comments, and now I'm wondering if they forgot to send me my check.

I think I'm regarded as something of an intellij zealot at work but now a bunch of people have switched. Hopefully I'll receive my check soon.

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

#127

I'll chime in my opinion: Java is getting something right that I don't see much elsewhere: Dependency Injection. Combine this with a mocking framework and you can write _actual_ isolated unit tests for every single part of your stack. We're fans of CDI, it's a more polished Spring framework without the legacy weight. We're developing in Quarkus, MicroProfile, and bigger monoliths in Apache TomEE. We use ActiveMQ exte…

> We avoid the fanfare of Docker, as really it's not needed for Java apps; they're somewhat self-contained anyway and it created more problems than it solved.

What does this mean?

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

#129

I'll chime in my opinion: Java is getting something right that I don't see much elsewhere: Dependency Injection. Combine this with a mocking framework and you can write _actual_ isolated unit tests for every single part of your stack. We're fans of CDI, it's a more polished Spring framework without the legacy weight. We're developing in Quarkus, MicroProfile, and bigger monoliths in Apache TomEE. We use ActiveMQ exte…

> We avoid the fanfare of Docker, as really it's not needed for Java apps; they're somewhat self-contained anyway and it created more problems than it solved. What does this mean?

Because the code runs in a VM already, they are not concerned about isolating further.

For example, if you're writing code in C++ targeting Linux, using Docker helps with reproducible builds and deploying on any hardware.

But if you have a VM, there are less advantages. There still are some, of course, with orchestration etc if you want it.

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

#130

I'll chime in my opinion: Java is getting something right that I don't see much elsewhere: Dependency Injection. Combine this with a mocking framework and you can write _actual_ isolated unit tests for every single part of your stack. We're fans of CDI, it's a more polished Spring framework without the legacy weight. We're developing in Quarkus, MicroProfile, and bigger monoliths in Apache TomEE. We use ActiveMQ exte…

> We avoid the fanfare of Docker, as really it's not needed for Java apps; they're somewhat self-contained anyway and it created more problems than it solved. What does this mean?

I think it means that they like to install software and manage servers rather than renting a container cluster to host your app.
Post reply on HN