A software engineering blog
Bitwise Engineering
Notes on building software from the bits up: functional programming, succinct data structures and AI workflows. Each post is a self-contained page with diagrams you can step through and models you can play with.
What you’ll find here
Functional programming
Types, purity and composition as everyday engineering tools: what they rule out, and what they cost.
Succinct data structures
Structures that answer queries in close to the minimum space the data needs: bit vectors, rank and select, and the engineering that makes them fast.
AI workflows
Working with coding agents and models in practice: what to hand them, how to check their work, and where the guardrails go.
Posts
-
Explainer
Announcing patchcov
Patch coverage for git diffs, as a command and a GitHub Action: a precise, gateable answer to what a change left untested, with no service in the loop.
-
Example · Decision
ADR-002: Rate limit at the edge gateway
Enforce one per-client token bucket in the gateway, with state in Redis, so limits hold however many services and replicas run behind it.
-
Reference
Component gallery
Every building block in the theme, with the markup to use it. The visual reference for authors and agents.
-
Reference
Glossary
Shared definitions for the terms used across these documents. Words defined here are underlined on every page; hover or tap one to see its definition.
-
Example · Design doc
Moving rate limiting to the edge
Replace per-service limiters with one token bucket per client in the gateway, backed by Redis, so a client's limit holds however far we scale.
-
Example · Explainer
Token bucket rate limiting
How a token bucket admits bursts but enforces an average rate — with a live simulation, implementations, and the mistakes that bite in production.
-
Example · Decision
ADR-001: Rate limit inside each service
Each service enforces its own per-client token bucket in process, so we can ship limits before launch without new infrastructure.
Replaced by ADR-002: Rate limit at the edge gateway