As I’ve mentioned, I’m focused on making sure students understand underlying concepts without the need for code. I really believe that if they know what a loop is conceptually, they can create a loop in any language. Yesterday, I tackled both the concept of an algorithm and basic programming concepts by using food. I broke the students into groups of 3 or 4 and gave each group a set of supplies. For the morning class, we had bagels, cream cheese, and strawberries. The afternoon class had crackers, cheese and pepperoni. Each group got a plate, necessary utensils and napkins. Then each group selected a person to be the robot. I conferred with the robots and explained that they needed to be stupid. They don’t know what cheese, bagels or crackers are. They know basic directions and that’s it.
As you can see from the pictures, the students had fun, especially when the directions went awry–as they did in every group. In the morning class, we had time to test out the process using me as the robot. That was instructive for many of the students as well. In some groups, the robots helped out a little too much. I didn’t.
In both classes, we discussed what was difficult about the process. The fact that the robots could just be told to pick up a bagel or cracker was difficult. They realized quickly how much humans know compared to computers. I asked how they overcame their difficulties. It was interesting how many different programming concepts they used to complete their tasks. Some groups defined their objects. They described what each item was and where it was located (object-oriented programming, ftw!). Some defined functions, like spreading. They all repeated actions in a loop. Some simply said, “Repeat.” Some used ctrl-c, ctrl-v, which I thought was hilarious and awesome. They all used conditions, mostly in a “while” loop: “move hand down until you hit an object.” And we talked about how to orient a robot using things like coordinate plans or just left and right, up and down. I also suggested that their plate could serve as a clock, so they could say, put your hand at 3 o’clock. I went through basic programming concepts after the activity, and I was able to connect each concept to something a group did during the activity.
The homework had been to read some material about algorithms and write what they think an algorithm is and how it relates to programming. After the activity, I asked if they would revise their answer. Most said yes. Many said, just saying it’s a list of instructions isn’t enough. They talked about figuring out how many steps to break the problem down into, that some of those steps need to be small and detailed. Some even talked about having algorithms within algorithms, so that you might have an overarching set of instructions, but smaller sets within the larger one. They also talked about what the robot knows and understands versus what humans understand, and that they needed to figure out how the robot is seeing things or understanding things, so that they know how best to give instructions. In one class, that discussion led to questions about how real robots work.
What I’m now looking forward to is seeing how this plays out with actual programming. One thing I’ve noticed this year, both because I’ve made some changes, and because I have more students, is that girls like to talk about what they’re learning. Some of my students have even said as much, so I think I’m going to build in time after every concept to have a conversation about it. I think it allows them to create their own ways of remembering and understanding the concept. They use their own contexts and metaphors. And I’m there, of course, to make sure it’s accurate. I knew this intellectually before, but seeing it play out is really interesting.