Uncategorized

  • A module that got its own database and gave it back

    Splitting the billing schema onto its own instance in 2021, and rejoining it three years later because every report crossed the boundary. The reason given in 2021 was…

  • Branch coverage at 100%, and meaningless

    Every branch executed, and no assertion that any of them produced the right answer. The assertTrue(true) is the tell, and it exists because a test with no assertions…

  • Twenty Twenty-Four as a reference, not a parent

    The 6.4 default theme is the clearest worked example of a pattern-driven block theme, and using it as a parent is a different decision entirely. Reading a default…

  • json_validate() before json_decode(), and the memory it saves

    Checking whether a string is valid JSON meant decoding it and throwing the result away, which allocates the whole structure to answer a yes-or-no question. The saving is…

  • Vite 5, and the Node 18 minimum

    The November release drops Node 16, which reached end of life in September, and the upgrade was mostly about the runtime rather than the tool. A major version…

  • Sampling traces at five per cent, keeping every error

    Full tracing on a service doing forty thousand requests a day is a data volume problem; sampling uniformly loses the requests worth looking at. Head sampling decides at…

  • Block hooks, and the plugin that inserts itself

    6.4 in November, and a plugin that can insert a block without editing a template. Install instructions that said “now edit your footer”.

  • The Randomizer, and rand() in a test that must be stable

    A test using shuffle() that failed roughly once a fortnight, and a global seed that could not be set without affecting everything else. The Randomizer arrived in 8.2…

  • An anti-corruption layer for a supplier that renames fields

    A supplier who renamed four response fields in a patch release, twice in two years, with the second one costing an afternoon instead of a week. The null-coalescing…

  • A fixture builder instead of a fixture file

    A JSON fixture of a full order, loaded by 40 tests, where each test cared about two fields and was coupled to the other thirty. The fixture file…