Writing
Every post, snip, cheatsheet and project in one place. Filter by type, tag, or status.
You're about to add logging to a new service, or you're staring at
an existing one where every incident turns into a grep-and-guess
session across a dozen disconnected log lines. Replace the
step-by-step logs with one wide event per request.
| Cheat | Sep 23, 2026 | 11 min read | done | Sep 24, 2026 | 0% |
A tiny `createEvent(name, seed)` that accumulates fields over the
life of a request via `.set()` and emits exactly one structured log
line via `.emit()`, so a request that touches ten steps still
produces one row instead of ten.
| Snip | Sep 23, 2026 | 4 min read | done | Sep 24, 2026 | 0% |
A checkout endpoint with a log line at every step looks like good
observability, right up until a customer says "my payment failed"
and you have thirteen unrelated lines from thirteen unrelated
requests to sort through. The fix isn't more logs, it's one wide
event per request instead.
| Post | Sep 23, 2026 | 11 min read | done | Sep 24, 2026 | 0% |
An endpoint that queries once per parent row instead of once per
request looks fine with ten rows and falls over with ten thousand.
Batch the per-row lookups into one query and the round trips
disappear.
| Cheat | Sep 18, 2026 | 5 min read | done | Sep 23, 2026 | 0% |
The same endpoint, run through four traffic tiers. At 1k req/s
almost any design survives. At 10k the database and the single
instance give first. At 100k the cache and the load balancer become
the systems under test. At 1M the architecture itself has to change,
because the failure mode is no longer capacity, it's correlated
behavior across clients you don't control.
| Post | Sep 17, 2026 | 16 min read | done | Sep 23, 2026 | 0% |
Choosing physical tenant isolation over a shared, RLS-scoped schema
buys two new problems: knowing where a tenant's data actually lives,
and running one migration correctly hundreds of times instead of
once. Neither has an app-code fix, both need their own
infrastructure.
| Post | Sep 12, 2026 | 12 min read | done | Sep 23, 2026 | 0% |
A missing tenant filter is a data leak, not a crash. Row-level
security fixes that structurally, but rate limits, connection pools,
and error codes built for one instance break the same quiet way once
the API runs as several.
| Post | Sep 12, 2026 | 21 min read | done | Sep 23, 2026 | 0% |
A plain payment endpoint looks correct until you trace what a
double-click, a timed-out request, or a redelivered webhook actually
does to it. Each one turns one payment into two. Idempotency keys
are the fix, at two layers most write-ups skip.
| Post | Sep 11, 2026 | 17 min read | done | Sep 23, 2026 | 0% |
An App Router route is prerendered by default and silently turns
dynamic the moment you read something request-specific. Knowing which
bucket a route belongs in (and what forces it out) is the
difference between an instant page and a server render on every hit.
| Cheat | Sep 1, 2026 | 7 min read | done | Sep 18, 2026 | 0% |
A client that retries a POST after a timeout can create the resource
twice or charge a card twice. An idempotency key lets the server spot
the retry and replay the first response instead of doing the work
again.
| Cheat | Sep 1, 2026 | 6 min read | done | Sep 23, 2026 | 0% |
Page 1 of 4 | ||||||
Showing 36 of 36 pieces