Uncategorized

  • CLS is caused by an image without dimensions

    Layout shift is nearly always an element that reserved no space and then took some, and images are the largest single cause. Browsers compute an aspect ratio from…

  • Nullsafe short-circuits the whole chain, not one link

    When a nullsafe operator short-circuits, everything to the right of it is skipped — including method arguments, which are not evaluated at all. The short-circuiting is the same…

  • A composable that registers its own onUnmounted

    Cleanup belongs beside the thing it cleans up, and a composable can register lifecycle hooks because it runs inside the component’s setup scope. A mixin could register hooks…

  • proxy_read_timeout is not fastcgi_read_timeout

    A slow endpoint returning a 504 through nginx has three different timeouts that could be responsible, and they are configured by different directives. The distinction between a 502…

  • Sparse fieldsets make the query count depend on the caller

    Letting a client choose which fields it wants is a good feature and moves the eager-loading decision from the controller to the request. Without deriving the eager loads…

  • A snapshot test is a diff you agreed to review

    A snapshot test asserts that output has not changed, which is only useful if somebody reads the diff when it does. The regeneration reflex is what makes snapshot…

  • wp_options autoload, ranked by size

    The total autoloaded payload is a single number that predicts a large fraction of baseline request time, and almost nobody knows theirs. Tracking the figure over time is…

  • A module with too many variables is a copy

    A module exposing every attribute of the resources it wraps has not abstracted anything — it is the same configuration with an extra indirection. The test is whether…

  • Window functions with an explicit frame clause

    Adding ORDER BY to a window changes what the aggregate means, because it changes the default frame from the whole partition to everything up to the current row.…

  • WeakMap, and the cache that does not leak

    A memoisation cache keyed on object identity keeps every object it has ever seen alive, which in a long-running process is a leak with no upper bound. The…