Types at the edges
Parse untrusted input once, at the boundary, into a type that cannot be wrong. Everything inside gets simpler.
tech, developers, and the code underneath
49 pieces tagged architecture,
from May 9, 2025 to November 20, 2026.
Parse untrusted input once, at the boundary, into a type that cannot be wrong. Everything inside gets simpler.
The joke is that it is hard. The useful version is that there are four strategies and picking the wrong one is the actual problem.
Wall time goes backwards, monotonic time does not measure what you think, and both of them are lying about the other machine.
Retries turn a brief failure into a sustained one. Jitter, budgets, and backoff are not optional extras.
Rewrites and migrations get scoped as "everything the old thing does." That scope is almost always wrong.
Who did what, when, and to what. Getting it right is mostly about deciding it is a product feature rather than a log.
Every codebase has one. Here is how it happens and the four ways out, in order of cost.
Every task has a parent that waits for it. That one rule eliminates leaks, orphans, and most cancellation bugs.
Adding a replica looks like free read capacity. It is free right up until replication lag becomes a correctness bug.
Offset pagination is wrong in two ways that only show up at scale, and the fix changes your API.
What actually happens between your code returning success and the data being safe. Most systems are less durable than their authors think.
Errors that cross a service or module boundary need different treatment from the ones that stay home.