# Learn

https://ethang.dev/learn/

> A curriculum for people who write software with AI assistance, and who want to be able to judge the result. Ten stages, in order, covering what to build, how to specify it precisely enough to check, and how to measure whether it worked. Every stage mixes something you can follow along with and something worth returning to, and ends with a check you can run to know it landed.

# Learn

A curriculum for people who write software with AI assistance, and who want to be able to judge the result. Ten stages, in order, covering what to build, how to specify it precisely enough to check, and how to measure whether it worked. Every stage mixes something you can follow along with and something worth returning to, and ends with a check you can run to know it landed.

## 01 Fluency

The unglamorous prerequisites that make everything after them cheap. Do this stage first and the rest of the curriculum takes half the time.

- [The Missing Semester of Your CS Education](https://missing.csail.mit.edu/) (video, by MIT): Shell, editors, version control, debugging, profiling. Taught as a series of live sessions, and the single best hour-to-value ratio on this page.
- [8-bit computer](https://eater.net/8bit) (video, by Ben Eater): Build a working computer on breadboards, one episode at a time. The friendliest possible route into what a clock and a register actually are.
- [Crash Course Computer Science](https://thecrashcourse.com/topic/computerscience/) (video): Forty short animated episodes. Watch it before the serious books and the vocabulary stops being a wall.

### The Hard Parts, in full

Will Sentance's complete set, all in one register: a lecture where someone reasons in front of you, builds the mental model on a whiteboard, and drills it until it holds. Watch them in sequence rather than cherry-picking, because each one assumes the model the last one built.

- [JavaScript: The Hard Parts, v3](https://master.dev/courses/javascript-hard-parts-v3/) (course): Closures, async, OOP, and metaprogramming as a model of execution rather than a set of tricks.
- [The Hard Parts of Object Oriented JavaScript](https://master.dev/courses/object-oriented-js/) (course): Prototypal design, and how it enables ES6 classes under the hood.
- [The Hard Parts of Functional JavaScript](https://master.dev/courses/functional-js-fundamentals/) (course): Higher-order functions, composition, pure functions, and immutability.
- [The Hard Parts of Asynchronous JavaScript](https://master.dev/courses/javascript-new-hard-parts/) (course): Promises and async/await from the call stack, event loop, callback queue, and micro-task queue.
- [The Hard Parts of Servers and Node.js](https://master.dev/courses/servers-node-js/) (course): HTTP, TCP/IP, and ports from first principles, then the event loop, streams, and buffers.
- [The Hard Parts of UI Development](https://master.dev/courses/hard-parts-ui-dev/) (course): Data binding, templating, virtual DOM and reconciliation, and hooks, all built from scratch. The clearest account of what React is actually doing.
- [The Hard Parts of Neural Networks](https://master.dev/courses/hard-parts-ai/) (course): Prediction and training from a basic decision model up to a neural network, with fraud detection and image recognition as the worked examples. Filed with stage 8's material too, but it belongs in this sequence.

**Done when:** You can start a project, commit, run it, break it, and read the error without leaving the shell.

**Pair with:** Watch the Hard Parts series in sequence, because each one assumes the model the last one built. Take Missing Semester first if the shell is still unfamiliar.

## 02 How the machine works

What a line of code actually does to the machine, and roughly what it costs. You can only judge code you did not write to the depth you understand the machine underneath it.

- [Nand to Tetris](https://www.nand2tetris.org/) (course, by Shimon Schocken, Noam Nisan): Build a computer from a NAND gate up through an operating system. The bottom rung done rather than described.
- Code (book, by Charles Petzold): The same ladder in prose, and a different register. Read instead of Nand to Tetris if you want the map before the construction.
- [Computer Enhance](https://www.computerenhance.com/) (video, by Casey Muratori): The cost lens on the same machine: what a line of code costs and why.
- [Structure and Interpretation of Computer Programs](https://sarabander.github.io/sicp/) (book, by Abelson and Sussman): The deepest available treatment of what an abstraction is, free online, with the 1986 MIT lectures and an OpenCourseWare version alongside it.
- [Why Don't People Use Formal Methods?](https://www.hillelwayne.com/post/why-dont-people-use-formal-methods/) (paper, by Hillel Wayne): Read here rather than with the formal methods material, because it is the best short account of why a correct idea loses to a convenient one.

**Done when:** From reading one line, you can say what the machine does with it and roughly what it costs.

**Pair with:** Build it with Nand to Tetris, read Code for the map, then read Structure and Interpretation of Computer Programs when you want to know what an abstraction actually is.

## 03 Deciding what to build

How to work out what to build before any code exists: getting a requirement out of real users instead of guessing, and turning it into something you can check.

- [The Mom Test](https://www.momtestbook.com/) (book, by Rob Fitzpatrick): Customer conversations without the flattery. Short, funny, and the fastest read here.
- [Shape Up](https://basecamp.com/shapeup) (book, by Ryan Singer, Basecamp): Free online, opinionated, and enjoyable. The appetite framing, fix the time and vary the scope, is the most transferable idea in it.
- [Continuous Discovery Habits](https://www.producttalk.org/) (book, by Teresa Torres): Opportunity solution trees, with a blog that is easier to start with.
- [Specification by Example](https://www.manning.com/books/specification-by-example) (book, by Gojko Adzic): Turning a decision into executable acceptance criteria.
- [Domain Modeling Made Functional](https://pragprog.com/titles/swdddf/domain-modeling-made-functional/) (book, by Scott Wlaschin): Types as a specification of what is representable, the closest thing to a compile-time check on a requirement.
- Problem Frames (book, by Michael Jackson): The best treatment of why the hard part of a requirement is the boundary between the machine and the world it models. The book has no stable public page, so look it up by title.

**Done when:** Before any code exists, you can state the one thing the user does that the system must never break.

**Pair with:** Start with The Mom Test for the conversations, then Domain Modeling Made Functional to put the requirement into types.

## 04 Specifying so a machine can execute it

How to write a specification precise enough that a machine can execute it, then check the result against the system's own behavior.

### The artifact and the tool

Start with the video course, not the logic book. Lamport teaches the artifact, and the artifact is the point.

- [The TLA+ Video Course](https://lamport.azurewebsites.net/video/videos.html) (video, by Leslie Lamport): The spine of this stage, and genuinely watchable once you accept that the first two videos are the price of admission.
- [Learn TLA+](https://learntla.com/) (course, by Hillel Wayne): The written on-ramp, better at explaining what a spec is for.
- [Logic for Programmers](https://logicforprogrammers.com/) (book, by Hillel Wayne): The prerequisite this stage was missing: logic for working programmers, no math background required.
- [Alloy](https://alloytools.org/) (lab, by Daniel Jackson): The most immediately satisfying tool here. Write a small model, hit run, and it draws you a counterexample you can click through.

### Proof and its falsifier

Proof, model checking, and the current shape of spec-first tooling. Templates are not evidence, so the falsifier sits here too.

- [SysMoBench](https://arxiv.org/abs/2509.23130) (paper): A test of the claim that an AI model has formal specification handled. Agents formally model eleven real system artifacts in TLA+, and the strongest models still fail on conformance for the largest ones.
- [Software Foundations](https://softwarefoundations.cis.upenn.edu/) (course, by Pierce et al.): Proofs about programs, in Coq, free.
- [Dafny](https://dafny.org/) (course): Specifications and verification in one language, tutorial assuming no logic background.
- [Kani](https://github.com/model-checking/kani) (course): Bounded model checking for Rust, the practical industrial entry point.
- [GitHub Spec Kit and Kiro](https://github.com/github/spec-kit) (book): For the current shape of spec-first tooling. Both are templates, not evidence.
- [The MCP specification](https://modelcontextprotocol.io) (paper): The interface contract for tool use. Specifying the tools an AI agent can call is this stage's skill applied.
- [The Raft paper](https://raft.github.io/) (paper): Read as a model of what a legible specification looks like when it is designed to be understood rather than to be clever.

**Done when:** The TLA+ model checker finds an interleaving bug you predicted before running it, or your model passes conformance against your own service's traces.

**Pair with:** Watch Lamport first for the artifact, then read Wayne for how specs get adopted. Learn TLA+ alone and you write specs nobody runs.

## 05 Reading code you did not write

How to reach a judgment about code you did not type, which is now most of the code in front of you.

- [Crafting Interpreters](https://craftinginterpreters.com/) (book, by Robert Nystrom): Build a parser, a resolver, and a bytecode VM. Every indexer, analyzer, and code-graph tool becomes readable afterward, because you have written the thing they are built from. Also the best-written technical book on this page.
- Working Effectively with Legacy Code (book, by Michael Feathers): Sensing and separation, the canonical text on making untested code observable, which is what reading code you did not write requires.
- [The Programmer's Brain](https://www.manning.com/books/the-programmers-brain) (book, by Felienne Hermans): How reading code actually works, and why unfamiliar code is slow rather than hard.
- [Static analysis](https://abseil.io/resources/swe-book/html/ch20.html) (lab): Soundness versus completeness, and how a noisy check trains developers to ignore the tool. Chapter 20 of Software Engineering at Google, on the Tricorder platform.
- [Tooling specifications](https://microsoft.github.io/language-server-protocol/) (paper): SCIP, Tree-sitter, and the Language Server Protocol, read as specifications of what a tool can know about code.

**Done when:** Given a 10k-line repository you have never seen, you can name where a given behavior is decided and point at the tool output that proves it.

**Pair with:** Read Crafting Interpreters to see how the tools are built, then Legacy Code for the code you actually inherit, which usually has no tests.

## 06 Checking the result by measuring it

Tools that produce a number instead of an opinion: coverage, mutation score, fuzzing, property tests, and the measurements that say whether the code does what you asked.

### The method itself, before any of the tools

Everything in this stage is the scientific method applied to software. These are the general sources on the method: how it works, where it goes wrong, and what an honest test costs. None of them assume a background in science, and all of them are free.

- [Understanding Science 101](https://undsci.berkeley.edu/understanding-science-101/) (course, by University of California Museum of Paleontology, Berkeley): The clearest plain-language account of how science actually works, written for the public and for teachers. Its most useful page is the one that takes apart the tidy textbook version: there is no single method that all scientists follow, and the loop is messier and more honest than the diagram.
- [Cargo Cult Science](https://calteches.library.caltech.edu/51/2/CargoCult.htm) (paper, by Richard Feynman): Feynman's 1974 commencement address, and the shortest useful statement of the whole discipline: the first principle is that you must not fool yourself, and you are the easiest person to fool. Read it for the reason a check has to be able to fail, not for the story about the Wesson Oil advertisement.
- [Calling Bullshit](https://callingbullshit.org/videos.html) (video, by Carl Bergstrom, Jevin West): A University of Washington course, recorded as ten hour-long lectures and free to watch. It teaches the reading half of the method: how a claim is dressed up, which statistics get abused, and what evidence would actually settle the question. The book of the same name covers the same ground.
- [Testing Treatments](https://en.testingtreatments.org/book/) (book, by Imogen Evans, Hazel Thornton, Iain Chalmers, Paul Glasziou): Free online in full, in fifteen languages. The best worked example of the method anywhere: how we know whether a medical treatment works, told through the history of the fair test. If you want one book that shows why a control group, a control for bias, and a check on chance are not bureaucratic details, this is it.
- [Statistics Done Wrong](https://www.statisticsdonewrong.com/) (book, by Alex Reinhart): Free online, and it assumes no statistics. A catalogue of the errors that get published every day, which is the same list of errors that turns up in a benchmark, a dashboard, or an A/B test result.
- The Knowledge Machine (book, by Michael Strevens): Why the method took so long to invent, and why it works even though scientists are not especially rational. The argument is that science succeeded by adopting one narrow rule, that claims must answer to observation and experiment, and by shutting out everything else. Useful for anyone tempted to treat reasoning as the whole of thinking.
- [Science Fictions](https://www.sciencefictions.org/p/book) (book, by Stuart Ritchie): How good research goes wrong: fraud, sloppy statistics, publication bias, and hype, with the replication crisis as the worked case. The most readable account of why a published result is a claim and not a fact.

### The loop

Then the follow-along material. Testing is the stage where a video course beats a book most clearly, because the loop of write, run, watch it fail is something you learn by doing.

- [Web App Testing](https://master.dev/courses/web-app-testing/) (video, by Miško Hevery): One hour twenty-two minutes, and the best method-first treatment available. The tradeoff between unit, integration, system, and end-to-end tests on scope, speed, and isolation; then refactoring a function so its async call becomes testable; then the anatomy of a test as setup, stimulus, and expectation. Tools appear as illustrations of the method rather than as the subject.
- [Gilded Rose refactoring kata](https://github.com/emilybache/GildedRose-Refactoring-Kata) (lab, by Emily Bache): The same method applied until it holds. Take a legacy function with tangled conditionals, pin its behavior with characterization tests, then refactor without changing what it does.
- [Samman Technical Coaching](https://sammancoaching.org/) (course): Free material on testing and refactoring as teachable technique rather than tool usage.
- [Testing Overview](https://abseil.io/resources/swe-book/html/ch11.html) (paper): Software Engineering at Google chapter 11, free, and the org-scale account of why a test suite decays.
- [Google Testing Blog](https://testing.googleblog.com/) (corpus): Short practical posts, method over library.
- [Obey the Testing Goat](https://www.obeythetestinggoat.com/) (book, by Harry Percival): Free. TDD taught by building a real application, with a sense of humor about how badly it goes at first.
- [Fuzzing101](https://github.com/antonio-morales/Fuzzing101) (course, by Antonio Morales): Free. Ten exercises that fuzz real CVEs in real projects. The most satisfying thing here, because you find actual bugs.
- [The Fuzzing Book](https://www.fuzzingbook.org/) (book, by Andreas Zeller et al.): Free and complete. The reference version of the same subject.
- [fast-check and Hypothesis](https://fast-check.dev/) (lab): Property-based testing in TypeScript and Python. Hypothesis shrinks failures into the smallest example, which is the demo that converts people.
- [In praise of property-based testing](https://increment.com/testing/in-praise-of-property-based-testing/) (paper, by John Hughes): What property-based testing found that example-based testing could not.
- [Mutation testing](https://stryker-mutator.io/) (course): Stryker and mutmut. The check on the check: coverage says a line ran, mutation score says a test would have noticed.
- [Playwright and Testcontainers](https://playwright.dev/) (lab): Browser and dependency testing you can have running in an afternoon.
- Why Programs Fail (book, by Andreas Zeller): The book-length treatment of the same subject, in a different register. The book has no stable public page, so look it up by title.

### What each instrument actually checks

Every item here names a different failure mode. Example-based tests check the cases you thought of. Property-based tests check the ones you did not. Fuzzing checks crash and memory safety at volume. Mutation testing checks the tests.

- [How SQLite is tested](https://www.sqlite.org/testing.html) (corpus): The reference model for this stage. 155.8 KSLOC of C against 92,053.1 KSLOC of test code, four independent harnesses, 100% branch and MC/DC coverage, and a soak test of about 248.5 million test instances before a release.
- [Jepsen](https://jepsen.io/analyses) (corpus): The best worked corpus of falsification in the field. Each report names the property it tested and shows the history that broke it.
- [Trustworthy Online Controlled Experiments](https://experimentguide.com/) (book, by Kohavi, Tang, Xu): Free companion material. The discipline of deciding in advance what result would change your mind.
- [Causal Inference: The Mixtape and What If](https://mixtape.scunning.com/) (book): For when you cannot randomize. Both free.
- [PortSwigger Web Security Academy](https://portswigger.net/web-security) (lab): Free labs. The failure lens on security, learned by breaking things.
- [OWASP ASVS](https://asvs.owasp.org/) (paper): Security as a verifiable checklist rather than a review posture.
- [Accelerate](https://itrevolution.com/product/accelerate/) (book, by Forsgren, Humble, Kim): Delivery measured as a rate rather than asserted, and the source of the DORA metrics.

**Done when:** Deliberately break the code and a test fails, with a mutation score above zero, and a fuzz target runs ten minutes without a new crash.

**Pair with:** Start with Web App Testing, then add one measurement you do not already have: mutation score, a fuzz target, or a property test.

## 07 Operating what shipped

What happens after deploy: cost, latency, failure, and the economics that decide what to automate.

### Cost, latency, and failure

The expensive-to-check side of the job happens after deploy, in cost, latency, and failure. This is where the economics live, and the free Google books are unusually readable for their length.

- [Designing Data-Intensive Applications](https://dataintensive.net/) (book, by Martin Kleppmann): The model of correctness under partition, which is the reasoning no tool will do for you.
- [Distributed Systems](https://nil.csail.mit.edu/6.5840/2025/) (video, by Robert Morris): MIT 6.5840. Lectures, labs, and papers free. Implementing Raft remains the most reliable way to learn why consensus is hard.
- [Database Systems](https://15445.courses.cs.cmu.edu/fall2024/) (video, by Andy Pavlo): CMU 15-445. Free lectures, and the most entertaining database course in existence. The invariants agents break most often live in the schema and the transaction boundary.
- [Operating Systems: Three Easy Pieces](https://pages.cs.wisc.edu/~remzi/OSTEP/) (book, by Arpaci-Dusseau): Free. The substrate the cost model sits on.
- [Beej's Guide to Network Programming](https://beej.us/guide/bgnet/) (book): The timeout and partial-failure reasoning behind any retry you write. A timeout does not prove the request failed, and no tool will make that judgment for you.
- [Systems Performance](https://www.brendangregg.com/systems-performance-2nd-edition-book.html) (book, by Brendan Gregg): Measurement before optimization, with the tools to do the measuring, plus the free Linux performance page.
- [Site Reliability Engineering and the SRE Workbook](https://sre.google/sre-book/table-of-contents/) (book): Error budgets and SLOs are the economics this stage covers, and Eliminating Toil is the test for what to automate.
- [SRE Classroom](https://sre.google/classroom/) (lab): Free self-paced workshops where you design a system under real constraints. The closest thing to a game on this page.

### The check on the operation

The check on the operation itself: chaos as an experiment with a hypothesis, supply-chain integrity as a verifiable level, and observability as a discipline rather than a dashboard.

- [Software Engineering at Google](https://abseil.io/resources/swe-book) (book): Free. The chapters on testing and deprecation are the practical ones.
- [Principles of Chaos Engineering](https://principlesofchaos.org/) (paper): Short, and it defines the discipline as an experiment with a hypothesis.
- [Antithesis](https://antithesis.com/) (course): Deterministic simulation testing; the current industrial answer to finding the interleaving bugs a staging environment will not.
- [SLSA](https://slsa.dev/) (paper): Supply-chain integrity as a level you can verify, which matters more when agents produce the artifacts.
- Observability Engineering (book, by Majors, Fong-Jones, Miranda): The publisher has no stable public page, so look it up by title.

**Done when:** An SLO whose error budget burned, and one incident postmortem recording a hypothesis the evidence falsified.

**Pair with:** Read DDIA for the theory, then pick one: the SRE books for the human process, or Antithesis and Jepsen for the machine check.

## 08 AI engineering, as engineering

How to know whether an AI feature works: what the model is doing underneath, and the evals that score it.

### The builder's account

What belongs here is how to know whether the thing works. Two poles: the builder's account and the auditor's.

- [Neural Networks: Zero to Hero](https://karpathy.ai/zero-to-hero.html) (video, by Andrej Karpathy): Build backpropagation from scratch, then a tokenizer, then a small GPT. The most watchable serious ML material available, and it removes the mystery from the thing you are prompting.
- [Neural networks series](https://www.3blue1brown.com/topics/neural-networks) (video, by 3Blue1Brown): The animated version, if you want the intuition before the code.
- [The Hard Parts of Neural Networks](https://master.dev/courses/hard-parts-ai/) (course, by Will Sentance): The same ground in the lecture register, listed in full in stage 1.
- [Understanding Deep Learning](https://udlbook.github.io/udlbook/) (book, by Simon Prince): Free. The reference version of the same ground.
- [AI Engineering](https://huyenchip.com/blog/) (book, by Chip Huyen): The publisher has no stable public page, so her site is the entry point.

### The auditor's account

Evals are the checking track for this stage, and the skeptical empirical lens is what keeps the builder's account honest.

- [Building effective agents](https://www.anthropic.com/engineering/building-effective-agents) (paper, by Anthropic): The clearest short account of what an AI agent is, and of when not to build one.
- [Effective context engineering for AI agents](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents) (paper, by Anthropic): The mechanics behind context rot.
- [What We've Learned From a Year of Building with LLMs](https://applied-llms.org/) (book, by Yan, Bischof, et al.): The most honest operational account available free, with a blog worth following.
- [AI Evals for Engineers and Product](https://maven.com/parlance-labs/evals) (course, by Hamel Husain, Shreya Shankar): A paid cohort, with free entry points at evals.info and Hamel's blog. Evals are the checking track for this stage.
- [AI Snake Oil](https://www.aisnakeoil.com/) (book, by Arvind Narayanan, Sayash Kapoor): The skeptical empirical lens on the same claims.
- [OWASP Top 10 for LLM Applications](https://genai.owasp.org/llm-top-10/) (lab): Prompt injection is the standing one. The failure lens on agent security, learned by breaking things.
- [Simon Willison's blog](https://simonwillison.net/) (book, by Simon Willison): The running primary record on prompt injection and agent security, written plainly and updated faster than any course.
- [Exploring Generative AI](https://martinfowler.com/articles/exploring-gen-ai.html) (book, by Martin Fowler and colleagues): Field notes on what teams actually hit when they build with these models.

**Done when:** An eval suite where a prompt change moved the score in the direction you predicted before running it.

**Pair with:** Watch Karpathy to see what the model is doing, then read the eval material, because a prompt you cannot score is a guess.

## 09 Judgment under uncertainty

Acting on a forecast, calibrating a prediction, and knowing when a measurement is worth its cost. Predicting well is trainable.

- [Clearer Thinking](https://www.clearerthinking.org/) (lab): Free interactive tools that calibrate your judgment by making you commit to answers first. The most fun way into this stage.
- Thinking in Bets (book, by Annie Duke): Separating luck from decision quality.
- Superforecasting (book, by Philip Tetlock, Dan Gardner): Calibration, and how accuracy is actually scored.
- The Scout Mindset (book, by Julia Galef): The motivation to notice you were wrong, which no tool supplies.
- [Trustworthy Online Controlled Experiments](https://experimentguide.com/) (book, by Kohavi, Tang, Xu): The industrial version of the same discipline.

**Done when:** Your recorded predictions beat chance at a stated horizon, over at least twenty of them.

**Pair with:** Use Clearer Thinking to start committing to answers, then keep a written record of predictions and score yourself against it.

## 10 The primary record

The papers and talks behind everything above, for when you want the source rather than the summary.

The primary sources behind every claim above, and the reason this stage sits last: the list earns its argument before it cites it.

- [The programmer and the coder](https://doi.org/10.1145/3639562) (paper, by Grace Hopper): 1954, on the programmer and coder split, and why the coder's job would be the first replaced by the computer itself.
- [The FORTRAN preliminary report](https://softwarepreservation.computerhistory.org/FORTRAN/paper/p45-backus.pdf) (paper): The FORTRAN preliminary report's claim that it should virtually eliminate coding and debugging, reprinted with commentary in Backus's 1978 retrospective.
- [The coder's history](https://doi.org/10.1017/s0020859003001305) (paper, by Nathan Ensmenger): How FORTRAN and COBOL had the unintended effect of elevating their status rather than eliminating the role.
- [No Silver Bullet](https://www.cs.unc.edu/techreports/86-020.pdf) (paper, by Fred Brooks): 1986. Essential versus accidental difficulty, the vocabulary this whole list depends on.
- [What Is Software Design?](https://www.developerdotstar.com/mag/articles/reeves_design.html) (paper, by Jack Reeves): 1992. The objection that coding is design, which rules out the easy version of the argument.
- [Go To Statement Considered Harmful](https://www.cs.utexas.edu/~EWD/transcriptions/EWD02xx/EWD215.html) (paper, by Edsger Dijkstra): EWD215, 1968, on why legibility is the point of an abstraction.
- [Papers We Love](https://paperswelove.org/) (video): Talks on the same papers, in a conversational register, when the PDF is too dry.
- [SE Radio](https://www.se-radio.net/) (video): Interviews with the people who wrote the systems. The best commute-length source here.

**Done when:** You can name which claim in your design came from which paper.

**Pair with:** Read the papers for the claims, and use Papers We Love or SE Radio when a primary source is too dry to finish.
