When I first heard the idea that Java would be better off without null, I looked around for an explanation I could understand. Unfortunately, everything I found used code examples from languages without null. If I knew those languages, I wouldn’t be searching.

Always use the maven-enforcer-plugin Enforce dependency convergence Otherwise it’s possible that you depend on two different jars which both depend on log4j. Which one gets used at compile time depends on a set of rules that you shouldn’t have to remember. They can both (!) get exported as transitive dependencies. Require plugin […]

Why do we bother with multi-part numbers at all? Why not just use use a single revision number, like version 123? The parts of a version number communicate the magnitude of the change between the two versions. In the case of a library, this translates to how difficult the upgrade will be, which in […]

It’s pretty easy to break binary and source compatibility simultaneously. Remove one parameter from a public method or delete a method entirely and no existing code that used the method will compile or run. But how can we break just binary or just source compatibility but not both?

Whitespace is ignored by the compiler so it’s purely for readability. It’s there for you. Variable names have meaning and describe the intention of code. Similarly, whitespace describes the structure of a program.