Writing
Notes from building things, mostly while learning.
- Don't let a model grade its own homework
I ran a bake-off to pick the LLM that writes my kid's bedtime stories, and nearly shipped a rigged result. The fix was cheap: never let a model family judge itself.
- The forgotten flag that shipped a broken build
I built a Flutter release, put it on a real phone, and it was dead on arrival. The server was healthy the whole time. One missing build flag had quietly compiled localhost into a shipping app.
- How not to double-bill a dead phone
My bedtime-story app spends real money on a slow LLM call, and every retry, double-tap, and dead battery was a chance to charge for the same story twice. Here's the small set of moves that made retries free.
- You can't assert a story is good, so I built a judge
The highest-leverage file in my bedtime-story app was the one with zero test coverage: the prompt. Here's the offline eval harness I built to gate merges on an LLM's opinion, and the two choices that made its numbers trustworthy.
- A per-user cap is not a spend ceiling
OpenAI doesn't cap what you spend. I learned my one fair-use limit wasn't insurance at all, and rebuilt it into three layered ceilings before the invoice could teach me the same thing.
- My model wasn't boring, my ruler was bent
I built a bedtime-story app that kept opening every tale in the same quiet forest. Fixing the sameness was easy. The hard part was realizing the number I built to prove I'd fixed it was lying to me.
- The queue was in the database the whole time
My bedtime-story app runs slow LLM jobs in the background with no Redis, no BullMQ, no broker at all. The whole concurrency model is a three-line WHERE clause, and I want to convince you it's enough.
- My reasoning model thought itself out of an answer
I swapped in a smarter model and my bedtime stories got shorter. No error, no exception, just less story. The budget was the same, but it wasn't paying for the same thing anymore.
- The boolean that blocked bedtime
I built a bedtime-story app for my kid, and one evening my own safety filter refused to tell a story about a lion. The bug was one word in one line, and a lesson about the difference between a moderation API's flag and its score.
- Three ways in, and no others
My bedtime-story backend refuses to answer a plaintext request unless the deployment can prove the link was encrypted. Here's the 30-line gate that does it, and the one trade-off that decides when to pin a certificate and when not to.
- The 4096-character wall between my kid and a story
My bedtime-story app narrated every short test story perfectly, then went silent the night I hit play on a long one. The cause was a limit I'd never read, and the fix uncovered two bugs hiding behind it.
- Building this site from scratch
Why I'm self-hosting a personal website to learn the whole web stack, one layer at a time.