No laptops. Groups of three, chosen by the cards at the door. One marker per group, and the marker changes hands whenever the person holding it has an idea of their own β the marker writes what the group says.
There is a function on the board. Somebody wrote it, and that somebody did not leave a comment. Today there is no computer to ask. You are the computer.
def f(a):
x = a[0]
t = a[0]
for v in a:
if v > x:
t = x
x = v
elif v > t:
t = v
return tThe task
Each job arrives when your group is ready for it, not before.
Job one β run it by hand. What does f([4, 9, 2, 7]) return? Keep
a table on your board: one column for each variable, one row for each
trip through the loop.
Job two β say what it is for. One sentence, no jargon. Then rename
f, a, x, t and v so that your sentence is obvious to somebody
who never saw this board.
Job three β break it. Find a list for which your sentence from job two is no longer true. Your table is the proof: show the row where it goes wrong.
Job four β the change request. It must now find the third largest. Change it, then run your job-one table again to show that nothing else broke.
If you get there. Somebody asks for the tenth largest. What happens to your design?
What we do with the boards
Walk the room. Read the one-sentence answers on every board, and find one that differs from yours. Same code, careful readers, different sentences β what did the code do to cause that?
You will ask the same question again in ten minutes, of a bigger program, in The Inherited Program.
Facilitation notes
Say the task, do not hand it out. Only the function is written down. Jobs are given verbally, group by group, as each is ready β which keeps fast groups moving and never leaves one waiting.
Fifteen minutes, then stop. Most groups will be in job three. That is enough: the point is the table and the sentence, and the dayβs real work is still ahead.
Hints that do not give it away. βWhat does your table say
tis after the second row?β βWhich line would you be nervous to touch?β βDoes it matter where in the list the biggest value is?βThis is the diagnostic before the diagnostic. Who can keep a variable table is the most reliable signal of what came across from Grade 11. Watch the boards, write nothing down in front of them.