Clean Java is not magic, it is a pile of small choices you make every day. With Java 11 now the long term release, teams are juggling upgrades while still living with code born in Java 8. Nothing wrong with that. The point is the same. Readability wins. Name things…
Tag: java
Functional Thinking in Java
I have been writing Java long enough to remember when anonymous classes felt new, and tonight I want to share how I think about functional code in Java without losing readability. Lambdas landed a while ago and streams are everywhere in code reviews. With Java 11 out this fall and…
AEM Environments with Docker
Local AEM that starts fast, feels clean, and does not cling to your laptop is a dream many of us share. I have been spinning Adobe Experience Manager on laptops for years and I keep coming back to the same wish list. I want a repeatable AEM environment, I want…
AEM with Maven and HTL Setup
Spun up a clean AEM local today and wrote down the bits that keep my Maven and HTL setup neat and readable. Maven first, because future me likes boring builds When a project starts small and then grows new features each week, a tidy Maven reactor saves the day. The…
Java 10 var Keyword and Local Type Inference
Java 10 brings var to local variables and it is already changing how my editor looks during code review. The new var keyword is short for local type inference. The compiler still knows the exact types and keeps all the strong guarantees we expect from Java. We just stop repeating…
Java 9 Modules: Finally Some Structure
Java 9 modules land with a simple promise: real fences for our code. If you have shipped large Java apps, you know the drill. The classpath is a mystery box, private stuff leaks out, and a tiny bump in a jar can wake the pager. Project Jigsaw has been years…
Dependency Injection Without Frameworks
Dependency Injection Without Frameworks sounds like a dare, but it is really about writing code that reads like plain English and runs like a quiet engine. Every week I see someone reach for a giant container just to pass a couple of collaborators into a constructor. I get it. Angular…
Project Jigsaw and Modularity
Project Jigsaw is finally knocking on the door and everyone who writes Java is about to learn a new word: modules. For years the classpath has been our bag of tricks and pain. You dump jars in there and pray conflicts do not explode at runtime. It works until it…
Refactoring Old Code with Lambdas
I spent the evening shaving old code with fresh lambdas and it felt good. There is a special kind of joy in taking a brittle util class or a forest of anonymous classes and swapping them for clean lambda expressions. The code stops yelling and starts whispering. Today lambdas are…
Logging Best Practices in Java
Logging is that quiet teammate who remembers everything you forget in production. Why logging still wins If you build Java services for the web, logs are your second debugger. You can not attach a profiler to every box, and sometimes the bug shows up only under load or at three…