A chef cooking in a professional kitchen. Photo · Johnathan Macedo / Unsplash
Inside every machine: a kitchen. A chef, a counter, a pantry. The menu changes; the kitchen doesn't.

Right now, in your pocket, there's a kitchen.

A chef is reading a recipe — fast, focused, doing one thing at a time. There's a counter where the ingredients in active use are laid out. Behind the chef, a pantry holds everything else: every dish ever cooked, every recipe ever filed, every ingredient that hasn't been brought out yet.

This kitchen has been there since 1945. We've changed the menu — accounting, then word processing, then video games, the web, social media, and now AI. The kitchen itself has barely changed. Once you can see it, you can never unsee it. And once you can see it, every confusing thing about computers becomes obvious.

Meet the Trinity

Three things, working together. Everything else in this course — every line of C, every algorithm, every AI model — is built on top of these three.

CPU

The Chef

CPU

Reads instructions. Runs them. Nothing else. Never tires, does one thing obsessively well, and does it at stupid speeds.

  • Speed~3–5 GHz
  • Cores4–24
  • Volatile?n/a — it's the worker
RAM

The Counter

RAM

Holds what's cooking right now. Gone the moment you reboot. Tiny. Insanely fast.

  • Capacity8–64 GB
  • Access~100 ns
  • Volatile?Yes — gone on reboot
STORAGE · SSD

The Pantry

Storage

Holds every file, every app, every photo, every recipe — forever, even with the power off. Huge. Way slower.

  • Capacity256 GB – 8 TB
  • Access (SSD)~100,000 ns
  • Volatile?No — survives reboots

The chef can't cook directly from the pantry. Too many trips, too slow. So the chef brings ingredients to the counter first, works from there, and only goes back to the pantry when needed. That's it. That one detail — fast-but-small next to the worker, slow-but-huge in the back — is the root of basically everything interesting software does.

StoragePantry
RAMCounter
CPUChef
The slow path crosses once per ingredient. The fast path is travelled millions of times.

Why speed becomes everything

Look at how long each layer takes to reach. The numbers below are rough — machines vary, but the relative gaps stay pretty consistent across all of computing history.

CPU register
~0.3 ns
L1 cache
~1 ns
L2 cache
~3 ns
L3 cache
~12 ns
RAM
~100 ns
SSD
~100,000 ns
Spinning HDD
~10,000,000 ns

(Bars are clamped at the RAM scale — past that, drawing them to scale would burst the page.)

If 1 nanosecond were 1 second…

  • L1 cache — 1 second. (You're already there.)
  • RAM — about 1½ minutes.
  • SSD — about 28 hours. A day to walk to the pantry.
  • Spinning HDD — about 4 months. A whole season.

Every performance problem you'll ever debug comes back to this chart. Big-O analysis, cache optimization, database indexes, "why is this slow?" — all of it is downstream from those latency gaps.

A kitchen counter with prepped ingredients laid out, ready for cooking. Photo · Pierre Jarry / Unsplash

RAM is the counter — small, expensive, and right next to the chef. Everything you're actively cooking is here.

A program is just a recipe

What actually happens, second by second, when you tap the Safari icon? The whole sequence is a kitchen running an order:

  1. Order arrives. You tap the Safari icon. The OS — the kitchen's maître d' — tells the chef there's a new ticket.
  2. Recipe pulled from the pantry. The OS reads Safari.app from the SSD into RAM. This is the slow part of any program launch — pantry latency.
  3. Mise en place. The recipe and the data it needs go on the counter (RAM). The bits being touched right now get pulled even closer — into the chef's hands (L1/L2 cache).
  4. Cook. The chef executes one instruction at a time. Decode, execute, write the result back. Decode, execute, write. Billions of times a second.
  5. Plate. The result hits the screen. (How that actually works lives in Week 8 — the GPU.)
  6. Cleanup. When you quit Safari, the counter is wiped. The pantry still has the recipe for next time.

Every program ever written — whether it's a Python notebook, a Chrome tab, an AI model crunching inference, a video game, a web server — is running in this same kitchen. The programs get more complex. The kitchen stays basically the same.

A large metal shelving unit filled with stored food and ingredients. Photo · Jacob McGowin / Unsplash

Storage is the pantry — vast, persistent, slow to walk to. Everything not currently being cooked lives here.

What happens when the counter is full

Open Chrome. Open thirty tabs. Watch your machine slow to a crawl.

Your counter is overflowing. When RAM fills up, the OS spills the least-recently-used stuff back to storage — into a region of the SSD called swap. Next time the chef needs it, that's a 100,000 ns trip instead of 100 ns. Your machine isn't "tired" or "slow" — it's just making constant runs to the pantry.

This is why adding more RAM feels like a miracle fix. You're not making the chef faster. You're making the counter bigger so the chef stops making pantry runs.

Try it yourself

Look at your own kitchen, right now:

Each row is a separate chef on a separate ticket. Some are thrashing CPU (chopping fast). Some are choking on memory (counter overloaded). Some are stuck doing I/O (endless pantry runs). Every performance question ever collapses to one thing: which one is the problem?

What's next

You now have the kitchen. Next week we walk one floor deeper, into the chef's brain — and discover that "reading an instruction" is, secretly, just flipping switches with light.

Week 02 is The Language of Light — electricity, transistors, and binary. Why the entire 80-year history of computing rests on a single, almost embarrassingly simple idea.

Photo credits

All photos are free under the Unsplash license. Chef · Johnathan Macedo · Counter · Pierre Jarry · Pantry · Jacob McGowin. Trinity card illustrations are inline SVG.

Quick check

1. Which Trinity component loses its contents when the power is cut?
  1. The CPU
  2. RAM (the counter)
  3. Storage (the pantry)
Reveal Answer

Answer: B. RAM is volatile. It only holds data while powered. Storage survives reboots; the CPU is the worker, not a store.

2. Approximately how much slower is RAM than the CPU's own registers?
  1. About 2× slower
  2. About 100× slower
  3. About 10,000× slower
Reveal Answer

Answer: C. Registers ~0.3 ns vs RAM ~100 ns — roughly two-and-a-half orders of magnitude. Cache exists to hide that gap.

3. Why doesn't the CPU read directly from SSD storage during normal program execution?
  1. SSDs use a different voltage
  2. SSD latency is hundreds of thousands of times longer than RAM, so programs would be unusably slow
  3. Storage is volatile
Reveal Answer

Answer: B. ~100,000 ns vs ~100 ns. Pulling every byte from disk would be like fetching every grain of salt from the warehouse.