A class with six static factory methods and a private constructor, where five of the factories did the same thing with different argument names. Named constructors earn their…
A minimal base image sounded like an easy win and turned out to be a wash, because the extensions pull the libraries back in. The nine megabytes between…
A test that fails between 23:00 and midnight, once a year, and passes on every rerun. PSR-20 standardised this interface in 2022, which is worth adopting for the…
A billing module everybody agrees should be separate, a team of four, and 88 classes that reference it. The boundary, drawn in code rather than in conversation.
The codebase had it in about 60% of files, which is the worst of the three possible states because nobody can tell which behaviour applies where. The seven…
A profiler showed 140 ms of work happening after the response had been flushed, which is invisible to the user and entirely visible in the worker’s throughput. Destructor-based…
A helper that throws an HTTP exception was typed void, so every caller had to write an unreachable return statement to satisfy the analyser. never means the function…