Home / Writing
Write-ups

Notes from the work

Longer notes from real projects, each with a plain-English summary first

CSP

Six ways a nonce-based CSP breaks quietly

Websites have a security rule that only lets "approved" code run on the page, like a bouncer checking IDs at a door, so hackers can't sneak in fake code that steals your information. The tricky part is that it's easy to accidentally lock out your OWN real code too, and the page can look completely fine while secretly being broken for every visitor. This write-up covers six ways that happens by accident, and how to catch it before real people do. Useful for anything that handles logins, payments, or personal information, basically any real website or app a business actually depends on

Own page, with a plain-English summaryRead
Refresh tokens

Row lock plus grace window: why both are needed

When you log into an app, it hands you a secret "key" so you don't have to type your password every single time. That key gets swapped for a new one regularly, kind of like a hotel giving you a fresh room key whenever you check back in. If a stolen key ever gets used, the app can tell something's wrong. The hard part is that sometimes it's just you, like two open tabs or a slow phone retrying, not a thief, and a badly built system can't always tell the two apart. This is a small trick that tells them apart correctly. Useful for any app that keeps you signed in for a while: phone apps, websites you don't log into every single visit, anything with accounts

Own page, with a plain-English summaryRead
Ops reports

Making an LLM-written ops report harder to get wrong

Imagine running a website and wanting a short daily update on whether everything's working, without staring at raw logs yourself. You could have an AI write that update in plain English. The catch is that AI can get things wrong, like calling old data fresh, or calling an old problem "brand new." This write-up is about building the reporting system so the AI is only allowed to repeat facts that a separate, boring, always-honest program already checked, never make anything up on its own. Useful for a solo developer or small team running a website or app who wants automatic status updates without hiring someone to watch dashboards all day

Own page, with a plain-English summaryRead