Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
javanonymous
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
javanonymous
1y ago
There are several open source tools for Java (Eclipse, Visual Studio plugins, Netbeans and others). The reason I don't use them is not because they are bad, but because IntelliJ is so much better. I even use IntelliJ Ultimate for non J
2.
▲
by
javanonymous
1y ago
> why would we ever want in Java to hold a variable that you can't read immediately what is the type I can use my IDE to see the type if necessary. > Everything that came after isn't really memorable nor helpful, There are s
3.
▲
by
javanonymous
1y ago
I think it has a lot to do with work culture. Many tend to mimic what others are doing in order to not stick out. At my previous job some were able to change that by consistently using "modern" features of Java. It inspired others
4.
▲
by
javanonymous
1y ago
You can use version range with a maven plugin https://maven.apache.org/enforcer/enforcer-rules/versionRang...
5.
▲
by
javanonymous
1y ago
I haven't used it myself, but I know there is a plugin for a Maven build cache. It seems like it should improve incremental builds https://maven.apache.org/extensions/maven-build-cache-extens... > Incremental b
6.
▲
by
javanonymous
1y ago
The JVM tends to use as much memory as it can for performance reasons. It is not a reliable indicator of how much memory it actually needs. Why spend resources on clearing memory if there's still unused memory left? If memory is an i
7.
▲
by
javanonymous
2y ago
> It sounds good but in reality people end up spending time messing around with config files and annotations. I use Spring Boot at my day job and write mostly web services. I don't spend time messing around with config files and ann
8.
▲
by
javanonymous
2y ago
> which is something that I would have said would never happen if you had asked me five years ago. I think a lot of people are noticing the changes Java has had in the previous years. The language has made a lot of improvements, and I fe
9.
▲
by
javanonymous
2y ago
I think named parameters would be a great addition For now, I use Lombok's @Builder annotation. It makes it much easier to create and copy a record, where non-assigned attributes are set to default. Example: var bmw = Car.builder(
10.
▲
by
javanonymous
2y ago
That's why moduliths are becoming more popular. These are basically monoliths that enforce structure. The other advantage is that each "module" can be extracted as a micro-service later without much work.
11.
▲
by
javanonymous
3y ago
The Java library actually supports this case. It may not have the convenient "years" method directly, but you can add an arbitrary unit of time quite easily Example with duration: Duration.of(1, ChronoUnit.YEARS) Example
12.
▲
by
javanonymous
3y ago
I'm not sure if I understand your point, but I haven't seen any NIH at the places where I have worked. We have been encouraged to use popular stable libraries when possible. Java has several 3rd party dependencies that are expecte
13.
▲
by
javanonymous
3y ago
If I understand your use case, most loggers (like Logback) have the possiblity to automatically include the name of the method that called the log-statement. Logback even supports including the call chain in the output, so you could include
14.
▲
by
javanonymous
3y ago
Lombok can be used for more than just getters/setters. I personally use the @Builder annotation on records with more than 3-4 fields. I find it much more readable than a long list of arguments to the constructor. It also makes it eas
15.
▲
by
javanonymous
3y ago
I've gotten 100x improvement with no code change by just adding an index in the database table. An inexperienced developer might have blamed the database and insisted on moving to NoSQL because of "web scale". If they got the
16.
▲
by
javanonymous
3y ago
They wrote it from scratch with the benefit of all the knowledge they had gathered after running the old system for years. A 2X improvement would not be surprising to me, even if they had rewritten it in the same language. . According to ot
17.
▲
by
javanonymous
3y ago
I'm curious about how you plan to work on checked exceptions. If it's just about ignoring forced exception management, Lombok provides the @SneakyThrows annotation. I would need something more before I add a new type of extension.
18.
▲
by
javanonymous
3y ago
It was included as an incubator feature in Java 19, and will be available as a preview feature in Java 21 later this year
19.
▲
by
javanonymous
3y ago
Spring Modulith is trying to enforce strict module boundaries. I haven't yet tried it myself, but it looks promising: https://spring.io/blog/2022/10/21/introducing-spring-modulit...
20.
▲
by
javanonymous
3y ago
At one of my previous jobs, they had a "BOM" that each service inherited from. This contained most of the core dependencies (Spring, database drivers, logging, monitoring, auth, service discovery etc.) with a default configuration
21.
▲
by
javanonymous
3y ago
There are tools for enforcing boundaries. One name for this is "Modulith" where you use modules that have a clear enforced boundary. You get the same composability as micro-services without the complexity. Here's how Spring