Uncategorized

  • Two serialisers, one controller

    Versioning the representation rather than the code, so the business logic exists once. Duplicating the controller is the obvious move and it duplicates the authorisation, the loading and…

  • private(set) on a collection, and the array copy that saves you

    Exposing an array property publicly for reading felt unsafe until the copy semantics were the point rather than an accident. PHP arrays are values, so reading one gives…

  • A starter kit read and not adopted

    Laravel 12 moves its starter kits out of the framework, which made them worth reading as a reference rather than as a dependency. A starter kit is for…

  • 188 tests deleted with the code they covered

    A directory of tests excluded from every tool since 2023, examined and removed along with what they tested. Three independent checks — coverage to find what the tests…

  • PHPUnit 12, and a two-hour upgrade

    A third consecutive annual major, each cheaper than the last, which is what doing the first one properly buys. The cost of an annual major is almost entirely…

  • TypeScript 5.8, and a narrowing that finally worked

    Return type checking for conditional expressions, which resolved a pattern that had needed an assertion since 2021. Overloads with a boolean discriminant are a common shape and the…

  • The recursion that needed a stack instead

    A category tree walker that recursed to a depth of eleven in development and to two hundred in production, on data nobody had constrained. The production data had…

  • A URI version, and why it beat a header

    Three ways to version an API, and choosing the one that is visible in a log line. The header approach is more correct and the URI approach is…

  • 18 KB of JavaScript, and where the rest went

    A page that shipped 140 KB in 2024 and 18 KB in 2025, accounted for honestly. The largest saving is the widget nobody could convert, deferred rather than…

  • A state file split that should have happened in 2021

    One state file for everything, and a change to a DNS record blocked by a lock held by a network apply. The apply order is the ongoing cost…