This article examines Lombok’s val — how it uses annotation processing to infer local variable types and enforce finality—highlighting benefits like cleaner, more readable code, compile-time safety, immutability, pre–Java 10 support, and seamless Lombok integration, while weighing drawbacks such as redundancy with Java 10+ var, reduced flexibility due to final variables, reliance on compiler internals with potential compatibility risks, and possible lag in new JDK support; it recommends using val chiefly in Lombok-heavy, pre–Java 10, immutable contexts, but preferring native var in modern Java and planning a long-term shift toward Java-native features.
While most AI code generation examples show how to quickly bootstrap a new web application, I was curious how far an AI coding assistant can take me in an existing, non-trivial codebase – one with a Java backend, automated tests, APIs (OpenAPI), PostgreSQL database migrations (Liquibase). So, I decided to explore the open-source AI tool aider, applying it to one of my Open Source projects.
“Java by Comparison” leads the reader through 70 examples into software-craftship. Each example compares a snipped of typical “unclean” code with a “clean” replacement, including a short discussion about the reasoning.
Wow, this amazing 34 hours video course Spring Framework 5: Beginner to Guru (with SpringBoot 2.0) is really quite massive! Learning almost full time, it took me a little over 2 weeks to work through. Ok, I admit, I only really completed ~99% because I skipped a few cookbook goodies which are currently completely irrelevant for me.
Recently I ran across a missing method="post" in a <form ...> tag within a Thymeleaf template which was working despite an @PostMapping annotation of the SpringFramework on the controller method. I was wondering how this could happen and did some investigation. Hopefully this article gives a better chance for the next one who runs into this problem.