Uncategorized

  • Intersection observer is in every current browser

    Last year it was Chrome-only and needed a polyfill. This year Firefox and Edge have shipped it, which moves it from an experiment to the default answer for…

  • dotnet watch run is the loop PHP developers expect

    A compiled language usually means an explicit build step between editing and seeing the result, which is the thing that feels slowest coming from PHP. The file watcher…

  • A CDN in front of an API needs a Vary header

    A cache keys on the URL. If the response depends on anything else — an Accept header, a language, an authorisation token — the cache will serve one…

  • The DEL that blocked the server, and UNLINK

    A 400ms pause on every request, once an hour, caused by a cache cleanup nobody thought of as expensive. Redis is single-threaded, and freeing memory is work.

  • CommonsChunkPlugin is confusing and about to be replaced

    Splitting vendor code from application code so the vendor bundle can be cached separately is the most common webpack requirement and, this year, the one with the worst…

  • GTID makes a failover survivable

    With binary log file-and-position replication, promoting a replica means finding the equivalent coordinate on every other replica by hand, at the moment nobody wants to be doing arithmetic.…

  • Analysing the tests as well as the source

    Test code is usually excluded from static analysis on the grounds that it is not production code, which is where a good proportion of the useful findings are…

  • Returning an array from render, without a wrapper div

    A component rendering three table cells had to wrap them in something, and there is no valid element to wrap a <td> in. 16 lets render return an…

  • An index that helps reads and halves your write throughput

    Every index is maintained on every insert, update and delete touching its columns, so an index added to fix one report is paid for by every write to…

  • Class constant visibility, at last

    Every class constant has been public since constants existed, so an internal lookup table intended as an implementation detail was part of the public API whether or not…