Blog
Notes on learning to think like an engineer
Puzzles to test your mental model, and what research says about making knowledge stick.
Idempotency keys: how to make retries safe
Networks fail, clients retry, and customers get charged twice. Here is the pattern that fixes it, with working code and the three edge cases most implementations miss.
Build a rate limiter: the token bucket in 20 lines
Why fixed windows let bursts through, how a token bucket fixes it, and a tested TypeScript implementation you can drop into a service today.
Read a query plan: five rules for fixing slow SQL
Most slow queries come from the same handful of causes. Learn to read a query plan and fix them, with every example run on a real database.
Seven JavaScript puzzles that expose your mental model
Predict the output of seven short snippets before you open the answers. Each one is a small lesson in how JavaScript really works.
Why predicting beats re-reading
Re-reading feels productive and works poorly. Three well-studied ideas explain why predicting, recalling and spacing out practice make learning stick.
A spaced review schedule in 15 lines of code
How to schedule reviews so you remember what you learn. A simple ladder of growing gaps, with the code to run it.