Structure and Interpretation of Computer Programs
This is demanding material—and that's why it works. Master the fundamental ideas of computation that shaped generations of programmers.
About This Course
This course is not about learning Python syntax. It is about learning how programs work.
The material is challenging. That's the point. SICP has a reputation for being difficult because it asks you to think deeply about ideas most courses gloss over. Expect to struggle—and expect to grow. The AI tutor is with you at every step.
Through classic SICP ideas adapted to Python, you will learn to reason about computation, abstraction, state, and interpreters—the foundations behind all modern software systems.
Originally developed at MIT by Harold Abelson and Gerald Jay Sussman, SICP teaches the fundamental ideas of computation. This course adapts the core SICP curriculum into Python, following the approach pioneered by UC Berkeley's CS 61A.
The course progresses from simple abstractions (functions) through compound data, state and mutation, object-oriented design, and finally to building your own interpreter. Each module includes video lectures with interactive checkpoints, the original SICP reading material, and hands-on lab exercises in Python.
Based on Structure and Interpretation of Computer Programs by Harold Abelson and Gerald Jay Sussman (MIT Press, 1996), adapted to Python following UC Berkeley CS 61A.
Prerequisites
- Basic Python fluency (variables, if/else, loops, defining functions)
- Comfort with simple math (algebra-level)
- No prior CS theory or functional programming experience required
What You Will Learn
- Use higher-order functions, closures, and lambda expressions to write expressive, reusable code
- Trace program execution using the environment model (frames, scoping, name lookup)
- Think recursively and analyze recursive vs iterative processes
- Design programs using data abstraction and abstraction barriers
- Process sequences and trees with map, filter, reduce, and recursive traversal
- Reason about mutation, aliasing, and identity in Python
- Use classes, inheritance, and polymorphism effectively
- Build a working interpreter for a small programming language
Terminology Mapping
How classic concepts map to the terminology used in this course.
| Classic | This Course (Python) |
|---|---|
| Procedure / Higher-order procedure | Function / Higher-order function |
| Lambda expression | Lambda expression (same concept) |
| Environment model of evaluation | Environment diagrams (frames & scope) |
| Recursive / iterative process | Recursive / iterative process (no tail-call optimization in Python) |
| Pairs (cons, car, cdr) | Tuples, lists, or closure-based pairs |
| Data abstraction (constructors + selectors) | Data abstraction (same pattern, using functions or classes) |
| Sequences (lists) | Python lists, generators, comprehensions |
| Message passing | Dispatch functions / methods |
| Generic operations / data-directed programming | Polymorphism / duck typing |
| Metacircular evaluator | Interpreter written in Python |
Your Learning Path
Each module builds on the last. Take your time—the AI tutor is with you at every step.
1.6 Higher-Order Functions — Functions as first-class values, closures, and the summation abstraction
Learn to pass functions as arguments, return functions as values, and use lambda expressions. See how one general pattern (summation) replaces many specific functions—the key idea behind abstraction.
1.7 Environment Diagrams — How names get values, and how evaluation actually proceeds
Build a mental model for how Python tracks names and values. Trace function calls through frames, understand name lookup and shadowing, and see why closures work.
1.8 Recursive Functions — Recursive vs iterative processes, tree recursion, and memoization
Understand recursive function definitions, trace call stacks, and distinguish linear from tree recursion. Learn when recursion leads to exponential blowup and how memoization tames it.
2.2 Data Abstraction — Constructors, selectors, and the power of abstraction barriers
Separate the use of data from its implementation. Build rational number arithmetic behind a clean interface, then see that even functions can serve as data.
2.3 Sequences — Lists, the signal-processing view, and lazy evaluation with generators
Process data with map, filter, and reduce. See sequences as pipelines, master list comprehensions, and discover Python generators for lazy, memory-efficient computation.
2.5 Trees — Recursive data structures and tree traversal patterns
Represent hierarchical data as trees. Learn the tree ADT (constructor + selectors), and master recursive patterns for aggregation, transformation, and search over tree structures.
2.6 Mutable Data — State, identity, and why mutation breaks substitution
Introduce mutation into the picture. Understand nonlocal, aliasing dangers, the mutable default trap, and the fundamental trade-off: mutation enables state modeling but makes reasoning harder.
2.7 Object-Oriented Programming — Objects as an alternative abstraction boundary
Organize state and behavior into classes. Connect OOP back to closures and message passing, then explore inheritance, method resolution, and how polymorphism enables multiple data representations.
3.1-3.5 Interpreters — Rebuilding the evaluator to understand computation itself
The capstone: build a working interpreter in ~100 lines of Python. Understand parsing, the Eval/Apply cycle, environments inside the interpreter, and how a language can describe itself.