The Importance of Dry Running Programs

Dry run techniques where you step through a program listing away from a computer are very powerful pedagogically as a way to teach programming as well as other computational topics (eg Turing Machines, algorithms, etc).

Two main approaches are

  • role play the execution of aspects of a program
  • draw dry run tables, showing the changing values of tables with a row for each line executed by the program

Role play is good as a way to give initial understanding of new programming concepts. Dry Running short program fragments then reinforces learning and acts as a diagnostic test to help students over barrier concepts.

Role playing dry runs

This video, part of the Box Variables activity, illustrates role playing the dry run of assignments

Diagnostic Tests / Puzzle Sheets

Use these kinds of sheets of simple dry run tests as a diagnostic test to catch problems with student mental models immediately, or just use them as puzzle sheets

Slides from various times I have presented this talk

Linked Activities – for more on the above