Notes from production.
Essays on backends, AI infra, and the small decisions that quietly compound into systems worth working on.
The case against async/await everywhere in Node.js
async/await made asynchronous code readable. It also made it easy to accidentally serialize work that should run concurrently. Here's how I think about it now.
Why I stopped using environment variables for secrets
Environment variables are the default answer for secrets. They're also leaked in crash reports, written to logs, and inherited by child processes. There's a better default.
Idempotency keys: the most underrated primitive in payments
Duplicate charges are silent. They don't throw errors, don't appear in your logs, and don't surface until a user notices. Here's the one primitive that prevents all of them.
oRPC and why I stopped writing REST routes by hand
tRPC was the right idea with the wrong constraint. oRPC keeps the end-to-end type safety without requiring you to go all-in on a framework. Here's what changed my mind.
Why I wrote a code generator instead of a framework
Frameworks couple your domain to someone else's opinions. Code generators give you the opinions, then get out of the way. Here's how Define works — and why.
Feature flags are a distributed systems problem
Most feature flag services pretend evaluation is stateless. It isn't. Stale cache, split-brain rollouts, and the rule engine nobody thinks about until it breaks.
Semantic caching in production: what pgvector actually gets you
Everyone talks about embedding similarity for caching LLM responses. Few talk about the cache-poisoning edge cases, the distance thresholds that actually work, and why latency isn't the real win.
I regularly share inspired thoughts on backend architecture, open-source discoveries, and the realities of shipping to production. Come say hi.