refactoring

  • The editor changed, and so did every plugin

    5.0 shipped on 6 December and the meta box is no longer the answer. What still works, what needs a flag, and what has to be rewritten.

  • sodium is in core now, and mcrypt is gone

    7.2 removed mcrypt and added libsodium to core in the same release, which is a clearer statement of intent than any deprecation notice. The API is deliberately small…

  • PHPUnit 7 changed the assertion you use most

    7.0 landed in February and deprecated a set of assertions that appear in almost every suite, with removals following in 8 — so the warnings are a deadline…

  • Extract a module before extracting a service

    Pulling a service out of a monolith is a distributed systems problem plus a refactoring problem at the same time, and the refactoring is the part that determines…

  • React 16 rewrote how a component fails

    An error in one component used to blank the page. 16 unmounts the whole tree deliberately — and gives you the mechanism to stop it.

  • A feature flag is a branch that ships, and it has to be removed

    A flag decouples deploying from releasing, which is genuinely valuable, and it also doubles the number of code paths that exist — permanently, unless somebody deletes it. Two…

  • Versioning by adding, and the field you can never rename

    The cheapest API version is the one you never create, and that is achievable for longer than most teams expect if every change is additive. Tightening validation is…

  • Object spread in ES2018, and Object.assign’s retirement

    Merging objects meant Object.assign({}, a, b), and forgetting the empty first argument mutated a — a bug that shows up two components away from where it was written.…

  • The strangler pattern needs a seam to strangle

    Routing some URLs to the new application and the rest to the old one is the whole technique, and it only works where a clean seam already exists.…

  • CSS custom properties are not Sass variables

    A Sass variable is substituted at compile time and does not exist in the output. A custom property is in the cascade, inherits, and can be changed at…