Analogize stacks and interrupts using a story in which a person is frequently interrupted in the course of performing everyday tasks.

  • For example, you can tell a story about a student working on her homework before being interrupted when her parent calls her down for a snack. This is interrupted by a knock on the door. The answering of the door is interrupted by a phone call from a wrong number. What does the student do next after each interruption?
    • "The story is explained through a diagram of the stack...As each activity is interrupted a reminder is placed on the stack. When any activity is finished they go to the stack to see what to do next."
A diagram illustrating the growth of the student's 'stack' of tasks following a variety of interruptions.

More about this tip

External Source

From: WOOLLARD, WILLIAM JOHN (2004), “The rôle of metaphor in the teaching of computing; towards a taxonomy of pedagogic content knowledge.”, University of Southhampton, School of Education, PhD Thesis, pg 122