Turn the black box of running code into a glass box you can watch.
GlassBox is a from-first-principles look at how computers actually work. Every lesson is a small program; we run it under CPython's tracer and let you step through it line by line, watching the variables change. The catch that makes it honest: the state you see at each line is real execution output, captured at build time — never a hand-drawn slide that could quietly lie about what a variable holds.
Stepping is the lesson
An abstraction and a running program are the same object at two zoom levels. Watching the state fill in, one line at a time, is what builds the abstraction in front of you. And if your mental model is wrong, the state fills in wrong — and the interpreter, not a teacher, delivers the verdict.
See it fail, on purpose
Each problem ships in several registers — including the buggy one a real beginner writes. You get to trace the bug and watch it fail in the state, instead of being told it is wrong.
Start here
Begin with Values and names and follow the course in order. Or open the full outline and pick whatever you came for.
Want the lesson that proves the whole idea first? The swap lesson shows three ways to swap two cups — one of which destroys a value before your eyes.
Curious how we keep it honest? See what the tracer proves.