Buggy Code

summary

fix bugs

time

10’

preparation time

5’

group size

all

material

screen

How it is done

  • take a piece of code from the previous day

  • introduce a 3-5 bugs

  • in class, run the code and see it fail

  • ask students to explain what is going on

  • ask students to fix the code

  • repeat until you fixed all the bugs

Variation

Alternatively, assign students to groups of three and give them a working program. Let each of them introduce a bug that the other ones have to fix. Play three rounds.

Note

This is trickier, because the IDE may spoiler what lines have changed or where the bug is.