Java beans have a readability problem. Not the pattern itself — fields plus getters and setters is fine, and a great deal of the ecosystem still relies on it — but the house style the average enterprise codebase wraps around it. Six lines of boilerplate Javadoc and braces for a one-word concept, repeated for every property, until a class with eight fields scrolls for two pages and tells you nothing you didn’t already know from the field name.
Continue readingCategory Archives: Uncategorized
Using JsonPath safely with Jackson’s JsonNode tree model
When working with JSON in Java, Jackson’s JsonNode tree model is a popular choice — especially in framework code that processes or transforms data. But what if you want to query that tree using flexible JsonPath expressions?
Jayway JsonPath is a powerful tool, but using it with pre-parsed Jackson trees isn’t as obvious as you’d think — especially when you’re aiming for safe, predictable behavior in production.
In this post, I’ll share a few techniques I found helpful for reliably applying JsonPath to JsonNode trees, making your queries safer, clearer, and better suited to framework-level code.
Continue readingMicro and midi-services: how should I divide my services?
With microservices architectures, one key question is where should the boundaries be. Is every entity a separate service? And how fine-grained should service architectural divisions be? We can offer some simple rules of thumb.
Continue readingHow to Crash the JVM in Three Lines of Code
This is a confirmed JDK bug. Just three lines of code to crash the Windows JVM.
Continue reading
