The Codecript Blog

Long-form notes on software engineering, distributed systems, databases, and the craft of building software.

RSS feed

  • Servers Are a Role, Not a Box — A field guide to web, application, database, DNS, TURN, mail, file, cache, media, game, and infrastructure servers — what each one actually does, how it fails, and how to choose one. 2026-11-05 · 33 min read
  • HTTP Caching Is a Correctness Problem — Cache keys, freshness, validation, and invalidation are not performance trivia. A deep guide to Cache-Control, ETags, Vary, CDN behavior, stampedes, and the bugs that only appear when a cache is warm. 2026-11-04 · 17 min read
  • MVCC Is a Time Machine With a Cleanup Problem — How PostgreSQL gives every transaction a consistent snapshot, why Repeatable Read still allows write skew, what Serializable actually adds, and why a long transaction is a vacuum emergency. 2026-11-03 · 18 min read
  • Closures Are About Lifetime, Not Nesting — A function does not capture a snapshot of a variable — it keeps the binding alive. That distinction explains the loop bug, stale callbacks, private state, and the memory leaks that survive long after the request is gone. 2026-11-02 · 15 min read
  • Rate Limiting Is a Distributed Systems Problem — Token buckets, sliding windows, and GCRA are easy to implement on one machine and hard to make correct across many. A deep guide to algorithms, Redis races, key design, 429 semantics, and failing gracefully under load. 2026-11-01 · 21 min read
  • The Event Loop Is a Scheduler, Not a Queue — A deep guide to how JavaScript runs timers, promises, rendering, and I/O on one thread — in browsers and in Node.js — and why "setTimeout(fn, 0)" is not a promise to run immediately. 2026-10-30 · 18 min read
  • The Index Is Not a Magic Wand — Adding an index can make a query slower. A deep dive into PostgreSQL storage, B-tree internals, planner costs, composite indexes, write amplification, and the operational habits that keep an index set honest. 2026-10-24 · 18 min read