Essays on backend systems, applied AI, and the open source tools behind them. The long ones are marked. The rest are working notes, kept because they were useful once. By Anish Kr Singh.
Alpine got the ergonomics right and stopped short on the engine. On fine-grained signals, a hand-written expression interpreter that survives a strict CSP, and what 16KB has to earn.
The block usually happens in the TLS handshake, before a single HTTP header is read. On JA3 fingerprints, self-healing selectors, and why I hand-wrote a crawl engine instead of importing Scrapy.
Most document pipelines throw the whole file at a model and bill you for the easy pages too. On rebuilding tables from word geometry, scoring yourself 0 to 1, and why the confidence score is the most important output.
How I gave a language model production database access without ever letting it write: a read-only contract, a sandboxed directive loop, and a default-deny API allowlist.
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.
How I structure serializers, views, and routers in Django REST Framework so API code stays predictable as a project grows.
Turning a tangle of status flags into an explicit, testable state machine that guards every order transition.
Why every inbound webhook needs a signature check, and how to verify HMAC payloads safely in Django.
Finding and fixing the silent N+1 queries that quietly add hundreds of milliseconds to an API response.
A practical caching layer for read-heavy endpoints, covering cache keys, invalidation, and stampede protection.
Moving slow work off the request path with Celery and RabbitMQ, with retries and idempotency that survive failure.
Setting up token authentication for a Django API, from issuing tokens to rotating and revoking them.
Designing endpoints that update and export thousands of rows without timing out or locking the database.
When Django signals keep code clean, when they hide bugs, and how to use them without regret.
Shipping schema changes to a live Postgres database without dropped requests or downtime windows.
Adding fast full-text search to a Django app by syncing models into Elasticsearch and querying them well.
Building clean, repeatable PDF documents like invoices and purchase orders directly from Django with ReportLab.
A pragmatic pytest setup for Django: fixtures, factories, database tests, and coverage that actually helps.
Wiring Sentry, Prometheus, and Grafana into a Django service so production tells you when it hurts.
A Docker setup for Django that stays fast in local development and lean in production.