How to Introduce Coding by Making a PB&J Sandwich

Screenshot (108)Coding is as simple as making a peanut butter and jelly sandwich.

Or IS it?

I remember going to The Tech in San Jose (CA) many years ago and walking up to a silent docent at a table with all the appropriate ingredients. There was a paper on the table, explaining that all one had to do was give the correct commands to the docent “robot,” and it would make you a peanut butter and jelly sandwich.

It was fun and much harder than I thought it would be! I recalled the experience when I was trying to craft a great into lesson for coding (The Hour of Code is coming up in December). That well-worn lesson plan (with some adjustments) would be a perfect way to introduce coding to my students.

First I found a talented and willing robot – in this case, my daughter Maggie. To add a technological element and enhance the Robot Maggie experience, we decided she should Skype into our classroom. The necessary materials were set up in the vice principal’s office: a jar of peanut butter, a jar of jelly, a loaf of bread, a knife and a plate along with a Surface Pro 3. Donning goggles and a lab coat, Robot Maggie awaited a specific time to call The Room Nine Kids – giving me time to introduce the lesson, access prior knowledge and set the stage for that exciting sound of a Skype call coming in!

All the excitement and learning is in the Sway below!

It took my students 47 minutes to get one PB&J sandwich made, which was both frustrating and exhilarating for the students. The value of Robot Maggie and the PB&J Sandwich was not only extremely beneficial for introducing coding: it has also given us a common experience to draw upon when sequential thinking is required.

Bonus outcome: I have observed my students thinking more about what they say and how they say it now, and that’s always a good thing!

Leave a Reply