Writing
Engineering Notes
Write-ups of specific problems, with the code that fixed them. No round-ups, no tool lists.
One Cloudflare Worker for every university subdomain
Quiz Slayer started as a quiz app for my own class. When other sections wanted it, every university needed its own subdomain. Here is how one Cloudflare Worker serves them all, and the route that stops it answering hosts it shouldn't.
Offline-first leaderboards: grade on the server, not the phone
An offline-first quiz marks answers on the phone, so the phone always knows the score. Letting it report that score is how a leaderboard gets forged. Here is the scoring that holds when the client can't be trusted.
Typing into another window on Windows without hitting the wrong tab
Windows sends keystrokes to whichever window has the keyboard, and a terminal tab can't be picked from outside. Here is how Nook proves it has the right Claude Code tab before it types a reply, and when it refuses.
Go os/exec and .cmd files: a Windows injection trap
Go quotes arguments for normal programs, not for batch files. Passing one hostile argument to an npm .cmd launcher from Go created a file on disk and no error. Here is the test, the fix, and what the fix costs.
Why Go crashed only in go test: uintptr and KeepAlive
A Windows API call was reading a buffer Go's garbage collector had already freed. The bug was invisible for weeks because it needs a GC cycle to land inside a window a few microseconds wide.
Free to spend, not total balance: offline budget math
Adding up account balances gives you a number that lies to you twice a month. Here is the single pass over a ledger that produces the number you can actually spend, and the double-counting bug I hit getting there.
GoHighLevel two-way sync: stopping your own messages echoing back
In a two-way GoHighLevel sync, every message you post comes back to you as a webhook. An idempotency key won't catch it, because it isn't the same event.