Reading Code
Three short lessons for grown-ups on reading a short program the way your child learns to: predict what it prints, keep a table of the variables, and follow a loop one turn at a time.
For grown-ups, from what TraceForge teaches children at Spark & Anvil.
Be the computer
You'll need: paper, a pencil and a short program written out (from TraceForge, or one you make up).
- One person writes a five-line program using two variables.
- The other predicts what it will print, out loud, before tracing.
- Trace it together with a table, one row per line.
- Compare the trace with the prediction, then swap roles.