Blog
Essays & notes
Writing on systems, ML infrastructure, and whatever else I run into.
Your dashboard is showing the wrong day — it's a timezone bug
A sale made at 11pm shows up on the wrong day, and the daily totals change depending on who is looking at the dashboard. The data is fine. The day boundary is the bug.
Page 2 should not change page 1
Offset pagination remembers a position, not a row. On a live dashboard, that is enough to skip rows and repeat rows.
Show it done, but don't fake it: optimistic updates that roll back cleanly
An optimistic update is a promise to the user. If the server says no, the UI has to keep that promise honestly — roll back, say why, and leave the data alone.
Your dashboard query is slow because the index is in the wrong order
Adding an index is easy. Putting its columns in the order your query actually uses is the part that decides whether it helps at all.
Your retry logic is the outage
A retry is a second request to a service that just told you it is struggling. If every client retries at the same instant, your recovery becomes a second outage.
Stop caching your dashboard like a marketing page
A marketing page can be an hour old and nobody notices. A dashboard that is an hour old is wrong. Cache for freshness, not just for speed.
Stop paying for rows you never render.
Your dashboard table shows 25 rows, but the `.filter().map().slice()` chain processes all 50,000 first. ES2025 iterator helpers make the pipeline lazy — only the rows you render get touched.
Your teardown logic is now a language feature
JavaScript's `using` declaration turns the cleanup code every dashboard developer writes by hand — aborting requests, closing sockets, clearing timers — into something the runtime guarantees.
Sort your state before you store it
Two years of production dashboards taught me one rule.