in reply to OT: Teaching Second Graders Programming

I recently gave a talk at DigiForge Student Tech Conference on "How to Think Like a Programmer". It was an hour presentation. About half of it was spent on examining the number guessing game: "I'm thinking of a number between 1 and 100." ..."Higher"... "Lower"...

Some of the kids had good intuition on efficient mental strategies that amounted to divide and conquer (a Binary search). Some had vague intuition that it might be a good idea to start in the middle and work upward or downward. Some took a fully linear approach. We went on to compare, and then to show how instead of solving the number guessing game, by providing a means to compare any two things in a given list, we can create a generalized algorithm, call it a Binary Search, and stop worrying about the details of how it works, paying attention only to whether the input is ordered, and whether we can tell it how to compare elements.

The talk got some good reviews, and people remained engaged throughout. Perhaps you could do the ten-minute version of the number guessing game.


  • Comment on Re: OT: Teaching Second Graders Programming