Coding and peanut butter

As part of our Spring 2012 learning… what? I said I would type up a vague idea of a plan? Well, yes, yes I did. But I haven’t. Sorry, been too busy with the actual learning stuff.

Anyway, I’ve signed up to receive weekly emails from a web site called Code Year. The emails are short, interactive lessons involving javascript, something I happen to already know, for The Boy to begin learning how to program. He really, desperately wants to code mods for Minecraft in order to have all of the animals make poop. Eight year olds have such lofty goals, don’t they? But before we try to dive into adding to a large pile of Java code, I though he should know anything about coding first. So here we go.

So far it’s been pretty good. I like that it offers just little bits at a time, plus short projects with a lot of hand holding and hints. We sit down and work on them together. However, I noticed this week that he didn’t seem to totally get the idea that the computer isn’t going to figure out what he wanted something to do just by giving it a name. For example, he changed a function he wrote from hello() to goodbye() and thought the computer would somehow just know that it needed to say goodbye now, even though he hadn’t changed the string he wanted it to print.

At that point, I realized it was time to break out a non-computer activity: making a peanut butter sandwich.

Some of you know what I mean already. It’s a very old idea. You use yourself to teach someone completely unused to thinking about the details of programming (or writing manuals!) by making them give you commands to do a very simple-seeming task… like making a peanut butter sandwich. Seems so easy! But is it?

The Boy learned pretty quickly that he was going to have to be specific… but he still made plenty of great mistakes.

He frequently forgot to tell me to actually go to the fridge or the counter, so I would respond with an error statement (“No ‘fridge’ object available!”). In some cases, I decided to really get his attention: when he told me to “go to the peanut butter” meaning the jar on the counter, I started to climb up on the counter with it. He didn’t make that mistake again.

After I got a few slices of bread out of the bread bag, he told me to put the bread down. So I dropped it on the floor. (Be specific!)

I think he learned a lot when he told me to put the knife in the sink without walking me over to it, so I threw it across the room. But I did get it in the sink!

But for all of us, the most memorable moment was when I was standing at the counter, two pieces of bread on a plate, holding the peanut butter jar with the lid happily sitting on the counter, and one empty hand. He then declared, “Spread peanut butter on bread!” thrilled with himself. I looked down, saw my empty hand, and took a moment to grin evilly at him. I then reached my bare hand into the jar, grabbed some peanut butter with my fingers, and began rubbing it across the slice of bread. I managed to cover about half the slice before he stopped laughing long enough to cancel the action.

He learned quite a lot about how he needs to state every tiny detail and anticipate what his program will need. I noticed an improvement in his programming right away! And when it comes to making memories, I don’t think he’ll ever forget his mom with her hand in the peanut butter jar…

3 thoughts on “Coding and peanut butter”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.