Week 09 · Phase 2 — The Ancestry
Why we start with C — the language two engineers wrote in a back office, that quietly runs everything.
Photo · Vertex Designs / Unsplash
You could start a programming course in any of forty languages. Python is gentler. JavaScript runs in a browser tab. Swift makes pretty things. Rust makes safe things. Go is hip. C is over fifty years old, has fewer than 40 keywords, no garbage collector, and will happily let you crash your machine in three lines.
And yet, every modern operating system is mostly written in C. Every database. Every interpreter for those gentler languages — yes, including Python — is itself a C program. Linux is C. The kernels of macOS, iOS, Windows, Android — C, with sprinkles of C++ and Swift on top. The numerical libraries inside PyTorch and TensorFlow that make AI feasible? C, mostly, with some C++ and CUDA. The bottom of the stack is C all the way down.
So we start there. Not because C is comfortable — it is famously uncomfortable — but because, for one phase, it is genuinely useful to feel exactly how the chef from Phase 1 wants to be talked to. Every other language you'll meet is, in some way, an apology for the way C asks you to think.
It begins in Murray Hill, New Jersey, in the late 1960s. Bell Labs — the research arm of AT&T, a phone company that had so much money from its government-blessed monopoly that it could afford to fund some of the best basic research on Earth. Out of that culture came the transistor (Week 2), information theory, the laser, the CCD, UNIX, and — for our story — a programming language.
In 1969, Ken Thompson, Dennis Ritchie, and a small team began writing an operating system for a discarded computer that nobody else wanted, the PDP-7. The OS was eventually called UNIX. They wrote it, painfully, in assembly. By 1971 they wanted to move it to a slightly less bad computer, the PDP-11. Rewriting the entire OS in PDP-11 assembly seemed unbearable. They needed a higher-level language — but every existing one was either too slow, too tied to its hardware, or designed by a committee with strong opinions about ALGOL.
So Dennis Ritchie wrote a new one. He started from a language called BCPL via a stripped-down dialect called B. He added types, structures, the things he and Thompson actually needed. He called it C. By 1973 the entire UNIX kernel had been rewritten in C — itself a radical move, since "writing an operating system in a high-level language" was widely considered a fool's errand. UNIX-in-C compiled, ran, and was easy enough to port that it spread, like a beneficial virus, through every university computer science department in the world.
Photo · Dave Meckler / Unsplash
Bell Labs paid the bills with telephone exchanges like this one. They paid for the research that, inadvertently, paid for everything since.
Every five years since 1980, somebody has predicted C will be replaced. It hasn't been. The reasons are surprisingly simple:
for loop becomes a tiny set of jumps and adds. There is almost no hidden machinery — what you write is pretty much what runs. This is what people mean when they call C a "thin layer over assembly".It is also, famously, a language with which you can shoot yourself in the foot in fluent and inventive ways. We will be careful. The point of this phase is not to ship production C. The point is to feel the chef.
Photo · Bernd Dittrich / Unsplash
Modern code, modern editor. The text might look familiar — but if it's a curly-brace language, its great-grandparent is C.
Look at the languages people actually use today. Almost all of them are syntactically and conceptually descended from C. The shape of a function declaration. Curly braces. for, while, if, else. Semicolons. = for assignment, == for comparison. None of those were inevitable — most of them came from C, and survived because everyone who learned C in the '80s carried them into whatever they wrote next.
Pick any of these and read its "hello world". You will be reading a slightly different dialect of the same family. The family is sixty years old now. It hasn't lost relevance. If anything, the C-with-better-safety branch (Rust, Zig) is having a renaissance precisely because, sixty years on, the chef still wants to be talked to in the same dialect.
Pull back the JSON-and-Python wrapping on any AI model and you'll find C/C++ with high confidence. PyTorch's tensor engine: C++. NumPy: C. CUDA kernels: a C-shaped language. Llama.cpp — the project that put a 7-billion-parameter language model on a laptop CPU? It's right there in the name.
The reason isn't ideology. It's that AI workloads are ferociously sensitive to the exact arithmetic the chef does. A 5% slowdown in the inner loop of a matrix multiplication is, at scale, a 5% slowdown of the entire model. Nobody has time for a vacation language to handle the inner loop. The inner loop must be C, or something equivalently bare-metal.
By the end of Phase 2 you will, in a small but real way, be able to look at one of those inner loops and understand what the chef is doing. That is the foundation everything else in the course builds on.
Higher-level languages let you forget the chef. C insists you remember.
Get a working C compiler in your hands today. You'll need it for the rest of Phase 2.
cc --version. If it asks you to install Xcode Command Line Tools, say yes — that gets you Apple's clang, a modern C compiler.gcc --version or clang --version. If neither is installed, your distribution's package manager has them: sudo apt install gcc, sudo dnf install gcc, etc.sudo apt install gcc. Or use MSYS2. Or use godbolt.org in a browser tab and skip local install entirely.Before we write a single line, we need to understand what happens to it. C is a compiled language, which is one of the reasons it's fast — and it's the dividing line between C and most of the languages people learn first.
Week 10 is The Translator — compilers vs. interpreters, and why a C program is, by the time the chef sees it, no longer C at all.
All photos are free under the Unsplash license. Vintage computer · Vertex Designs · Switchboard · Dave Meckler · Code · Bernd Dittrich.