Blog
Everything I can write.
-
Reliable Background Jobs with Nothing but PostgreSQL
A job queue built on FOR UPDATE SKIP LOCKED, visibility timeouts, retries with jittered backoff and idempotent handlers, with the SQL and a Python worker.
-
Backpropagation by Hand: A Two-Layer MLP in NumPy with a Gradient Check
Deriving every gradient of a small multilayer perceptron, implementing it in NumPy, and proving the implementation right with a finite-difference check before training it.
-
SIMD on the Laptop: NEON Intrinsics, Auto-Vectorisation and the Loop That Would Not Vectorise
Dot product and saxpy in single precision, scalar vs auto-vectorised vs NEON intrinsics, measured from L1, L2 and DRAM on an Apple-silicon laptop, with the assembly and remarks that explain them.
-
KVM from the Ground Up: VMX, EPT and a Guest in a Hundred Lines of C
How hardware virtualization splits the CPU into root and non-root modes, how EPT translates guest memory, and what a minimal /dev/kvm program teaches about where the hypervisor attack surface really is.
-
A Pragmatic REST API, Decision by Decision
Resource naming, versioning, cursor pagination, idempotency keys, RFC 9457 errors and rate-limit headers, with the measurements and the OpenAPI to back them up.
-
Bias and Variance in Practice: Ridge Regression on Polynomial Features
The bias–variance decomposition measured instead of assumed, with ridge regression on a degree-12 polynomial, a regularization path and learning curves from a NumPy experiment.
-
Cache-Aware Matrix Multiplication: Loop Order, Tiles and the Register Block That Did the Work
Naive, interchanged, cache-tiled and register-tiled DGEMM in plain C, auto-vectorised by clang, measured for N = 256 to 1024 on an Apple-silicon core and placed on the roofline.
-
A Minimal Linux Kernel Module, and How to Read the Oops When It Breaks
Building and loading an out-of-tree module, crossing the user/kernel boundary safely with copy_from_user, and decoding the oops and stack trace that a kernel-mode mistake produces.
-
Ports and Adapters in a Go Service
A hexagonal layout for a small Go service, with interfaces at the boundary and a core you can test without a database.
-
Policy Gradients from First Principles: REINFORCE, Variance and Baselines
Deriving the REINFORCE estimator step by step, seeing where its variance comes from, and checking the baseline argument numerically on a tiny NumPy environment.
No posts match these filters.