NOTES & ESSAYS
Writing.
On engineering, applied AI and taste. Details from the work, written down.
Why I hand-wrote a JavaScript framework in 2026
Why summit.js puts Alpine-style markup on fine-grained signals and a hand-written expression interpreter that runs under a strict Content Security Policy.
Why your scraper gets a 403 and your browser does not
The block usually happens in the TLS handshake, before any header is read. On handshake fingerprints, self-healing selectors and a hand-written crawl engine.
Parse first, escalate only what you must
Most document pipelines send every page to a model. On rebuilding tables from word geometry, scoring confidence from 0 to 1, and escalating only hard pages.
Building Querion: a Read-Only, Natural-Language Data Analyst
How I let a language model query production data without ever letting it write: layered read-only checks, a sandboxed directive loop and an API allowlist.
Trove: Giving Claude Code a Persistent Memory
A file-based memory index that reloads into context every session, so Claude Code stops starting from zero and each session begins further ahead than the last.
Designing Clean REST APIs with Django REST Framework
How I structure serializers, views, and routers in Django REST Framework so API code stays predictable as a project grows.
Modeling an Order Workflow as a State Machine
Turning a tangle of status flags into an explicit, testable state machine that guards every order transition.
Verifying Inbound Webhooks with HMAC Signatures
Why every inbound webhook needs a signature check, and how to verify HMAC payloads safely in Django.
Killing N+1 Queries with select_related and prefetch_related
Finding and fixing the silent N+1 queries that quietly add hundreds of milliseconds to an API response.
Caching High-Traffic Endpoints with Redis
A practical caching layer for read-heavy endpoints, covering cache keys, invalidation, and stampede protection.
Background Jobs with Celery and RabbitMQ
Moving slow work off the request path with Celery and RabbitMQ, with retries and idempotency that survive failure.
Token Authentication for a Django API
Setting up token authentication for a Django API, from issuing tokens to rotating and revoking them.