Uncategorized

  • :has(), and the JavaScript I deleted

    Styling a parent based on its children required a class toggled by script, which meant a render, a layout and a class name in two places. Three script…

  • Backfilling a column without locking the table

    Adding a nullable column is instant in 8.0; filling it for four million existing rows is not. Three steps instead of one — add nullable, backfill, tighten —…

  • An event between modules, and the coupling it did not remove

    Replacing a direct call with an event felt like decoupling, and the two modules were still deployed together, released together, and broken together. An event removes a compile-time…

  • The read model we built before anybody asked

    A denormalised projection built for a dashboard that was specified, prioritised and then never scheduled. The projection was the right shape for a requirement that did not arrive,…

  • An OpenAPI document generated from the router

    A hand-written specification that had been correct in March and described four endpoints that no longer existed. Generating from the router makes drift impossible in one direction —…

  • Quorum queues, and the mirroring we removed

    Classic mirrored queues have been the deprecated way to get replication for a while, and the replacement has different failure behaviour worth understanding first. The throughput cost is…

  • innodb_buffer_pool_size on a machine with other tenants

    The advice to set the buffer pool to 70-80% of RAM assumes a dedicated database server, and this one also runs PHP and Redis. The hit rate is…

  • The service provider that ran a query on every request

    A settings lookup in a provider’s register() method, executed on every request including the ones that never read a setting. The binding was lazy and the line below…

  • 6.3, the command palette, and a shortcut I actually use

    A command palette in the site editor, which sounds like a small addition and removes most of the navigating. Registering a command for a task the client does…

  • A specification object, and when the indirection pays

    A rule about which orders are eligible for a discount, expressed three times: in a query, in a validation check and in a report. The two methods must…