Uncategorized

  • The analyzer decides what matching even means

    A search that fails to find an obvious result is almost never a query problem. Text is tokenised and normalised at index time, and the query goes through…

  • Idempotency keys are what make a retry safe

    A client that times out cannot tell whether the request was processed. Retrying risks a double charge; not retrying risks losing the order. The only way out is…

  • Collections: pipe and tap keep a chain readable

    A collection chain reads well until it needs one step that is not a collection method — a log line, a total computed from the whole set —…

  • IntersectionObserver replaces the scroll listener

    Detecting whether an element is on screen has meant a scroll handler calling getBoundingClientRect(), which forces a synchronous layout on every scroll event and is the classic cause…

  • certbot renew is idempotent, so run it twice a day

    certbot renew checks every certificate it manages and does nothing for those with more than thirty days left. Running it often is therefore free, and running it rarely…

  • Integration tests want a transaction, not a truncate

    Resetting the database between tests by truncating every table is correct and slow, and it re-runs the seed data on each one. Wrapping each test in a transaction…

  • Throwable catches what catch (Exception) missed

    PHP 7 turned most fatal errors into thrown objects, but they do not extend Exception — they extend Error, and both implement Throwable. Every existing catch (Exception $e)…

  • Redis beyond caching: locks, counters and rate limits

    The cache server was already there doing one job out of four. A lock that expires, a release that checks it still owns the lock, and a sliding-window…

  • jQuery 3 deferreds finally follow Promises/A+

    A jQuery Deferred used to swallow exceptions thrown in a then callback and call its handlers synchronously if already resolved. Version 3 made both behave the way native…

  • yield from delegates without a loop

    Composing generators without yield from means a wrapper loop that yields each item from the inner one, which works and costs a function frame per item on top…