The Science of Computation (early access)
by Alejandro Piad Morffis
$25
What is an algorithm? Are there problems no machine will ever solve, however fast it gets? How does a message cross the planet in a quarter of a second and arrive intact? What is artificial intelligence, and what is it not?
Computer science is taught as a stack of separate courses — discrete mathematics one semester, operating systems the next, machine learning after that — and nobody is assigned the job of saying what holds the stack together. You can pass all of it and still not know what field you were in.
Textbooks don't fix it: they're written for someone already standing inside a subfield, and assume a map the reader was supposed to bring. Popular accounts pick one thread — Turing, or the internet, or the last three years of AI — tell it well, and stop. This book is the thing in between: the whole field at the level of its ideas, in one arc, with nothing softened into vagueness.
Because from outside, computer science looks like a collection of unrelated trades — proving theorems, etching circuits, designing databases, training neural networks. It is one science with one subject, which is the mechanization of cognition. What can be done by following rules, with no understanding anywhere in the process?
That question organizes the four parts:
Foundations of Computer Science — what lies permanently out of reach. Logic, computability, complexity, formal languages, information theory, proof and verification, discrete mathematics.
Computational Systems — what it costs to reach the rest. From a single logic gate up through processor architecture, operating systems, networking, distributed systems and cryptography.
Software Engineering — what happens when a thousand people build one thing none of them can hold in their head. Languages, design, databases, the web at scale, security, process, human-computer interaction, and video games as the capstone that needs all of it at once.
Artificial Intelligence — the question asked back at us, about the only other system we know of that thinks. Knowledge representation, search, machine learning, deep learning, and large language models as the finale.
You meet the people, too, and their reasons: Turing studying a human computer at her desk, following instructions she was not required to understand. Alonzo Church losing his foundation of mathematics to a contradiction found by his own students. Claude Shannon putting a number on information. Edsger Dijkstra, Donald Knuth, Geoffrey Hinton, Yann LeCun, and many more.
There is no mathematics beyond arithmetic in this book, and no code. There are no prerequisites of any kind. That does not mean the ideas have been made smaller: where something is hard, I explain it until it is clear — which is a different move from telling you it doesn't matter.
A high-school student can read this. So can a programmer who never took the theory, a computer science major who wants to see how the courses fit together, and anyone who spends all day using these machines and would like to know what they are.
It will not make you a computer scientist; no book does, that takes years. What it can leave you with is the shape of the field — where the ideas came from, who was worried about what, and which of the walls we keep hitting are walls rather than delays.
The state of this book. Twenty-six chapters, about 100,000 words, 268 pages — complete in first draft. Every chapter is written, revised, and fact-checked. What remains is a coherence pass across the whole arc, and the honest expectation that several chapters will be better a year from now. It is an alpha. It is also a book you can read end to end today.
Buying it gets you the current draft plus every future version, free, forever — and it is the reason there is a next version at all. When you find an error, and you will, write to me at apiad@apiad.net.
If artificial intelligence is what you came for, note that five chapters is what AI is worth inside a book about the whole of computer science, and nowhere near what the subject is worth. The longer version is a separate book, Mostly Harmless AI, which spends its full length on it. That book assumes the floor this one builds — either order works.
And if you want more than one of my books, The Computist Compendium bundles this one with four others, plus everything I write in the future, for $60.