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 t

The 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.