Algorithms
How things work under the hood. Clear explanations of algorithms and data structures that power everyday developer tools - diff engines, QR codes, regex engines, and more.
QR Code Internals: Encoding, Error Correction, and Capacity
How QR codes work: versions and sizes, encoding modes, Reed-Solomon error correction, masking patterns and capacity tables, with code examples.
Diff Algorithms Explained: LCS, Myers, and How Git Tracks Changes
How diff works: longest common subsequence, the Myers algorithm behind Git, unified diff format, and word-level vs line-level diffing, with examples.
What Runs Underneath the Tools
Both pieces here take a tool that looks like a black box and open it. They are the longest articles on the site because the interesting part is never the API - it is the constraint the algorithm is working around.
Diff algorithms explained starts from longest common subsequence, then follows the Myers algorithm that Git actually uses to build a minimal edit script, and finishes with why unified diff looks the way it does. It also covers the practical split between line-level and word-level diffing, which is the difference between a readable review and a wall of red. The text diff tool runs this family of algorithms in the browser, and the JSON diff tool shows what changes when you compare structurally by key instead of line by line.
QR code internals covers versions and sizes, the four encoding modes, Reed-Solomon error correction, and the masking patterns that stop a scanner losing the grid. The payoff is being able to predict capacity before you generate anything, and knowing which error correction level to pick when the code will be printed on something that gets scuffed. Try the results in the QR code generator.
If you want more of this angle applied to a different problem, catastrophic backtracking in the web category explains why a backtracking regex engine can go exponential on a fourteen-character input.