Living Museum of Learning

Where real moments become exhibits
← Prev Next →
Drop the Smaller

Drop the Smaller

From a row of classrooms to a Python algorithm

Tianjing is already comfortable with for loops. In the first half of today's class, she reached Khan Academy's Grade 5 Course Challenge and scored 26/30. Our plan is working beautifully: she is moving toward Grade 8 or 9 before the new school year begins.

On the whiteboard, we imagined a row of classrooms, each containing a number, and tried to find the maximum. Tianjing came up with a wonderfully simple description of the algorithm:

“Drop the smaller.”

I asked her to think about what would happen with 700 classrooms. She laughed when I said that a child who tried to keep all the numbers in their head might have an exploding head—and the computer wouldn't be happy either.

Then I told her, “Your algorithm is great. Let me give you a hand for coding.” We started with a running maximum:

m = 2, then m = 34 to kick off 2.

Tianjing was still nervous about Python's array syntax—arr = [], arr[0], and so on. But just before the end of class, her final whisper gave away the important change:

“I got an idea ... I'd use m to compare with arr sub ...”

The syntax was still scary. The algorithm was no longer scary.

A powerful transition happened today: Tianjing began translating an idea she had invented herself into a computer program.

She already knew the for loop. Now she was beginning to connect three levels of thinking:

problem → algorithm → code

“Drop the smaller” is not Python syntax. It is an idea. Once the idea is clear, the syntax can be learned.

A young learner can invent a simple algorithm, understand why it works, and begin translating it into code.

Start with a concrete problem, let the learner create the algorithm, then gradually connect it to familiar programming tools.

Programming becomes much more powerful when the learner learns to express her own ideas rather than merely reproduce code.