// BLOG · PAGE 3 OF 8

All posts

ALL POSTS · PAGE 3 / 8

DISTRIBUTED-SYSTEMS

Raft: Consensus You Can Actually Trace

Raft won because you can hold the whole protocol in your head: terms, a leader, and one log-matching rule. The mechanics of election and replication — and the operational corners (fsync, membership changes, pre-vote) where deployments actually bleed.

COMPILERS

How a Compiler Turns Your Loop Into SIMD

Modern CPUs can add eight numbers in one instruction, and your compiler will rewrite plain loops to use them — but only if you don't accidentally forbid it. Here's what auto-vectorization needs to fire.

CONCURRENCY

Memory Barriers: What volatile Won't Do For You

C's volatile keyword is the most misunderstood tool in concurrent programming. It stops the compiler from caching a value — but it does nothing about the reordering that actually breaks your lock-free code.

DATABASES

B-Trees vs LSM-Trees: The Storage Engine Tradeoff

Every database picks one of two ways to put data on disk. The choice between B-trees and LSM-trees is really a choice about whether you optimize for reads or writes — and you can't have both for free.

FUNDAMENTALS

From ASCII to Unicode: Why Text Is Harder Than You Think

Text feels like a solved problem until an emoji breaks your database, a filename won't delete, or 'MÜLLER' and 'müller' won't compare equal. The layered history of character encoding explains every mojibake bug you'll ever hit.

DISTRIBUTED-SYSTEMS

Logical Clocks: Ordering Events When 'Now' Doesn't Exist

Wall clocks on different machines disagree by milliseconds — eternity for a fast system. Lamport's insight: you don't need time, you need causality. Lamport clocks, vector clocks, and the hybrid compromise running inside your database.

AI

An AI Agent Is Just a Loop and a Capability Table

Strip the frameworks away and an LLM agent is about 35 lines: call the model, if it asks for a tool run the tool and feed the result back, repeat until it stops. I built one from scratch to prove it — and the systems concepts underneath are all familiar.

LINUX

epoll: The Syscall Under Every Event Loop

nginx, Node, Redis, and every async runtime you use sit on one Linux primitive. Why select died at scale, how epoll inverts the cost model, the level- vs edge-triggered trap, and the thundering herd that took years to fix.

DATABASES

MVCC: How Databases Let Readers and Writers Ignore Each Other

Postgres never updates a row — it writes a new version and lets old transactions keep seeing the old one. Multiversion concurrency is why reads don't block writes, why VACUUM exists, and why 'the database is bloated' is a real sentence.

DATABASES

SQL Indexes Under the Hood: Why Your Query Ignores Yours

An index is a sorted structure with physical properties, not a magic 'go faster' flag. Leftmost prefixes, covering indexes, selectivity, and the honest reasons the planner chose a sequential scan over the index you lovingly created.

ALGORITHMS

Regex Engines: The NFA/Backtracking Split That Explains ReDoS

The same pattern runs in microseconds in Go and hangs for years in JavaScript, on the same input. The reason is a fork in engine design made in the 1970s — automata vs backtracking — and it's why one regex took Cloudflare's edge offline.