Writing
- AI Coding Agent Verification: Batch E2E Screenshots, Not Browsers
Browser tools cannot keep up with an agent editing all day. Batch Playwright E2E screenshots, diff against baselines, and keep human review as the merge gate.
- Building an Agent Orchestrator for OpenCode and Claude Code
How I built an OpenCode plugin that runs persistent Claude Code engineers, enforces read-only modes in code, and why I deleted two agent layers along the way.
- Redis Caching Patterns: Stampedes, Invalidation, and Hot Keys
Cache-aside with jittered TTLs, delete after commit, one rebuilder per key with stale reads, and spread hot keys. Failure modes and when to skip each.
- Idempotency Keys: Designing APIs That Survive Retries
Store each key per client with a request hash and the final response. Return 409 for in-flight duplicates, 422 for payload mismatch, and replay the rest.
- MySQL vs PostgreSQL Isolation Levels: What Actually Differs
InnoDB defaults to Repeatable Read yet allows lost updates. PostgreSQL defaults to Read Committed and aborts them at Repeatable Read. Tested side by side.
- TypeScript Discriminated Unions: Make Invalid States Impossible
Replace loose union fields with a discriminated union: one literal tag picks the shape, TypeScript narrows the rest, and never or satisfies flags missed cases.
- TypeScript Node.js Project Setup: A Minimal Modern Starter
Node 24 runs .ts files directly, so a TypeScript project needs no ts-node: tsc only type-checks, plus native --watch, ESLint flat config, Vitest, and pnpm.
- Geohash Proximity Search in Python: Grids, Neighbors, Precision
Index points by geohash, look up the query cell plus its 8 neighbors, then filter by true distance. Python code, precision table, edge cases, PostGIS and Redis.