When Your Phone Generates Codes Without Internet: The Hidden Math Behind TOTP

Scan a QR code once, and your phone can generate login codes forever—no internet required. The codes change every 30 seconds, yet somehow both your phone and the server always agree on the correct value. There’s no cloud synchronization, no API calls, no real-time communication of any kind. The math just works. This isn’t magic. It’s the TOTP (Time-based One-Time Password) algorithm, defined in RFC 6238, and understanding how it works reveals one of the most elegant applications of cryptographic hash functions in everyday use. ...

8 min · 1694 words

How Digital Cameras Turn Photons Into Pixels: The Hidden Physics Behind Every Photo

On July 20, 1976, Bryce Bayer received U.S. Patent No. 3,971,065 for a “Color imaging array.” The Kodak engineer had no way of knowing that his checkerboard pattern of red, green, and blue filters would become the foundation for virtually every color digital photograph taken since. But the Bayer filter was just one piece of a much larger puzzle: how do we transform particles of light into the millions of colored dots that make up a digital image? ...

8 min · 1634 words

When Two Cores See Different Realities: The Cache Coherence Problem MESI Was Built to Solve

In 1984, researchers at the University of Illinois published a paper that would quietly shape every multicore processor built since. Mark Papamarcos and Janak Patel proposed a solution to a problem that didn’t seem urgent at the time—how to keep data consistent when multiple processors each have their own cache. Today, with CPUs packing dozens of cores, their invention runs on billions of devices, silently orchestrating a dance of state transitions every time one core writes to memory and another needs to read it. ...

10 min · 1998 words

How Fonts Turn From Math Into Pixels: The Hidden Rendering Pipeline

Every time you read an email, browse a website, or type a document, millions of invisible calculations transform abstract mathematical curves into the crisp letters on your screen. The process—font rendering—is one of computing’s most elegant dances between mathematics, human perception, and hardware constraints. What appears effortless is actually a sophisticated pipeline that has evolved over four decades. From Infinite Resolution to Finite Pixels A digital font file doesn’t store pictures of letters. It stores mathematical instructions—specifically, Bézier curves—that describe each glyph’s outline with near-infinite precision. TrueType fonts use quadratic Bézier curves, defined by two endpoints and a single control point. OpenType fonts with CFF (Compact Font Format) outlines use cubic Bézier curves, which offer more flexibility at the cost of complexity. ...

7 min · 1427 words

Why Thermal Cameras Can See Through Smoke But Not Through Glass

A firefighter enters a burning building. Visibility drops to zero as thick smoke fills every corridor. Yet somehow, through the thermal imaging camera mounted on the helmet, the outline of a child becomes visible behind a couch. Minutes later, another firefighter points a thermal camera at a window and sees nothing but a reflection—the glass appears as a solid wall to the infrared sensor. What makes these two scenarios so different? ...

8 min · 1582 words

How WebAssembly Actually Runs in Your Browser: From Stack Machine to Machine Code

In April 2015, Luke Wagner made the first commits to a new repository called WebAssembly/design, adding a high-level design document for what would become the fourth language of the web. The project emerged from a convergence of efforts: Mozilla’s asm.js experiment had demonstrated that a strictly-typed subset of JavaScript could approach native speeds, while Google’s PNaCl and Microsoft’s efforts in this space had explored similar territory. What none of these projects achieved was cross-browser consensus. WebAssembly was designed from the start as a collaborative effort, with formal semantics written in parallel with its specification. ...

10 min · 2099 words

When Round Robin Fails: The Hidden Mathematics of Load Balancing Algorithms

Imagine you’re running a service with 10 servers, each capable of handling 1,000 requests per second. You set up a round-robin load balancer—simple, elegant, fair. Every server gets its turn in sequence. Traffic flows smoothly until suddenly, at 2 AM, your monitoring alerts start screaming. Half your servers are overwhelmed, queues are growing, latencies are spiking, and the other half of your servers are nearly idle. What went wrong? The servers weren’t identical. Three of them were newer machines with faster CPUs and more memory. Three were legacy boxes running older hardware. The round-robin algorithm, in its mechanical fairness, sent exactly the same number of requests to a struggling legacy server as it did to a powerful new one. The legacy servers couldn’t keep up, requests piled up in their queues, and eventually they started timing out—cascading into a partial outage that woke up half your engineering team. ...

12 min · 2443 words

When Seeing Is No Longer Believing: The Deepfake Arms Race Between Creation and Detection

In late 2017, a Reddit user with the handle “deepfakes” posted a video that would fundamentally change how we think about visual evidence. The clip showed a celebrity’s face seamlessly mapped onto another person’s body. It wasn’t the first time someone had manipulated video, but the quality was unprecedented—and the software to create it was soon released as open-source code. Within months, the term “deepfake” had entered the lexicon, representing a collision of deep learning and deception that continues to evolve at a startling pace. ...

8 min · 1685 words

How Satellite Internet Breaks the Laws of Physics: Why Light Travels Faster in Space Than in Fiber

In November 2020, SpaceX requested that the Federal Communications Commission modify its license to operate 348 satellites at an altitude of 560 kilometers with an inclination of 97.6 degrees. These satellites would carry inter-satellite laser links—technology that allows satellites to communicate directly with each other without bouncing signals through ground stations. The physics behind this request reveals something counterintuitive: for long-distance communication, signals traveling through the vacuum of space can arrive faster than signals traveling through fiber optic cables on Earth. ...

9 min · 1823 words

Why Quantum Computing Is Not Just Faster Classical Computing

In 1994, mathematician Peter Shor published an algorithm that would factor large integers exponentially faster than any known classical method. The cryptography community took notice—most of the world’s encrypted communications relied on the assumption that factoring large numbers was computationally intractable. Shor hadn’t built a quantum computer. He had merely proven that if one could be constructed, much of modern security infrastructure would crumble. Three decades later, quantum computers exist. They factor numbers, simulate molecules, and solve optimization problems. Yet they haven’t broken RSA encryption. The gap between having quantum computers and having useful quantum computers reveals something fundamental about the technology: quantum computing isn’t simply a faster version of classical computing. It’s an entirely different paradigm with its own physics, its own constraints, and its own challenges. ...

10 min · 1926 words

How Bluetooth Hops 1,600 Times Per Second to Keep Your Devices Connected

Every time you press play on your wireless headphones, something remarkable happens beneath the surface. Your phone and headphones engage in a choreographed dance across the radio spectrum, switching frequencies up to 1,600 times every second. This is frequency hopping spread spectrum (FHSS), and it’s the reason your Bluetooth connection survives in a world crowded with Wi-Fi networks, microwave ovens, and billions of other wireless devices. The story of this technology traces back to a surprising origin: a Hollywood actress and an avant-garde composer. In 1942, Hedy Lamarr and George Antheil patented a “secret communication system” using frequency hopping to prevent radio-guided torpedoes from being jammed. The U.S. Navy initially dismissed their invention, but decades later, the same principle became fundamental to Bluetooth, Wi-Fi, and modern military communications. Lamarr’s contribution wasn’t the invention of frequency hopping itself—that had existed in various forms since the early 20th century—but her specific implementation using piano-roll mechanisms to synchronize hopping between transmitter and receiver. ...

11 min · 2300 words

How QR Codes Actually Store Data: From Reed-Solomon to 177×177 Grids

In 1994, Masahiro Hara faced a problem at Denso Wave, a Toyota subsidiary. Manufacturing plants were drowning in barcodes—each component required multiple labels, scanned one at a time, with workers manually tracking which code corresponded to which part. The existing barcodes could only store about 20 characters. What they needed was something that could hold thousands of characters and be read from any angle, in under a second. The solution Hara’s team developed became the QR code—a matrix of black and white modules that would eventually spread far beyond automotive manufacturing. By 2022, 89 million Americans were scanning QR codes on their phones. But the technical architecture that makes this possible—the Reed-Solomon error correction, the masking patterns, the carefully structured grid—remains largely invisible to the billions of people who scan them daily. ...

9 min · 1858 words