Back to Discovery Zone

Debugging & logic

Bug Lab

Debugging logic, tracing failures, and Boolean reasoning.

Half of all programming time is spent finding bugs. These activities train the specific reasoning that distinguishes good debuggers: tracing execution step by step, narrowing down where reality and assumption diverged, and reasoning about Boolean conditions until you spot the one that's wrong.

Defect localization · Hypothesis testingBug Detective

Inspect a small program that does the wrong thing. Find the bug by reasoning about each step, not by guessing. The cognitive habit this builds is the most under-taught skill in programming education.

Teaches: Phase 1 · Debugging
Boolean logic · Digital circuitsLogic Gates

Wire AND / OR / NOT / XOR gates and see the outputs. The same primitives every CPU on the planet is built from — and the foundation of every Boolean condition you'll ever write in code.

Teaches: Phase 0 · How Computers Think
Sequence reasoning · Causal chainsStory Builder

Reorder a sequence of story beats. A different framing of the same skill that breaks Algorithm Kitchen if you skip a step: getting ordered logic right.

Teaches: Phase 1 · Control Flow
Concurrency · Interleaving · AtomicityRace Condition

Two threads share a counter; each runs read/+1/write fifty times. Without coordination, increments get lost — final values fan out below 100. Flip the atomic switch and every run lands on exactly 100. The histogram tells the whole story.

Teaches: Phase 5 · Concurrency
Garbage collection · Memory managementGC Visualizer

Allocate objects on a tiny heap, mutate references, then run mark-and-sweep. Watch the BFS wave paint reachable objects green and the sweep phase reclaim the rest. Toggle reference counting and build a cycle to see the failure mode every modern runtime had to work around.

Teaches: Phase 7 · Advanced Systems