Marilyn Maloney

November 16, 2015

My colleague John Maloney was doing a workshop with his general purpose blocks language GP. He thought doing this Marilyn Munroe program would be a good starting place. He sent this image out as an example:

screenshot of GP program snippet

In an email to John and his team, I wondered if children would be able to read that program and understand what it did and how it did it. I unpacked some of the difficulties a beginner would have in understanding that program ("px" refers to something, but what does it refer to? what does the "for px in pixels" do? how does the "if", "else if" block work? etc). I made a little demo to illustrate an interface that might help beginners read programs in GP:

check out the demo

John and his team liked it! The demo managed to convey an idea that words couldn't — that there is something interesting in being able to show program behavior and not just a program's abstract static structure. I think this is a promising research direction, not just for beginner programmers but also for expert programmers.

Even cooler, my friend and colleague Michael Nagle tried it out with a couple children and had a really good experience! I loved his writeup of his observations so I included them below:

So at the beginning of John and Alisha's class, I invited in an older girl (maybe 10 or 11) after John mentioned he'd like to have more girls in his class at Parts and Crafts. She (Ravenna) is someone who is quite thoughtful and focused, but tends to do only 'crafty' things at P&C (cooking, knitting,) and very explicitly said 'I don't program, and I haven't used Scratch before.' I said I would just hang out with her and we'd see.

We invited a friend of hers, Harlan (boy, ~9) in. Harlan is very interesting to me in P&C's current batch of kids because he drives the staff crazy. He tends to get lost in his own world and disrupt classes. He's a very nice and friendly kid, but sometimes he just decides that he's going to be a hunchback, pulls his shirt over his head, and proceeds to insist on interacting with everyone as if there is no other reality, and there's no talking him down from it. As an example.

Harlan also said that he had never done Scratch before and was convinced he would fail at programming, but he was very cheery in this self-assessment. Will Macfarlane (one of P&C's leads) and I have talked about how children will start to 'own' failure and will proudly announce how bad they are at homework, test-taking, etc., perhaps as an unconscious defense-mechanism against the messages their schooling is giving them.

So Ravenna and Harlan came, and we started looking at the Marilyn Monroe example. It turns out this was intended for next week, but there was chaos in the classroom with finding a lost projector and getting GP installed on Linux, and I feel like when you offer invitations to an activity that's on trust (trusting me as a human,) and not natural-grown confidence, you have to strike while the iron's hot. So we got out my laptop, and flipped through John's email.

It became clear to me in a flash that the GP blocks weren't going to mean anything to these two new-to-blocks kids. So I pulled out Glen's explorable explanation.

This was basically great. Really, it provided a substrate for us to talk through what they were seeing happen. As is often the great challenge with teaching, it's to see what somebody else does and doesn't see, and somehow suspend one's own filter of seeing in that process. So the kids start playing around with it, holding the right arrow key. We were joined by a 3rd child, William, who has a lot of Scratch experience, but is less socially mature than the other two. He proceeds to insist on holding the right arrow key. Clearly, it is fun to hold it down.

I can't remember the exact flow, but first we talk through the explanation. We look at if the idea of a color in terms of three colors makes sense, and if then having those three colors as numbers make sense. At some point, someone, presumably looking at the checkmarks and X's part, asks 'can there ever be all 3 X's?' I think this question is fantastic for a number of reasons. One: it kind of looks like it! We're flipping through quickly. The X's and Check's clearly have a kind of raw, basic, iconic appeal. Somehow one of the kids is using that, perhaps unconsciously, as a visual anchor. It also gets at the underlying logical structure here. It's important to me that the question was: can they ever all be X's -- maybe it is visually clearer that things don't ever turn into 3 Checks, but as you race through the example, the X's blur together and it's a genuine question.

So, they started investigating this. Harlan proposed that it is true that there is always exactly one checkmark, and they proceeded to confirm this. For me this is interesting because part of P&C's frustrations with Harlan is that he never seems to be constructively engaged, and here he is, constructively engaged. To me that means something. We keep looking, and I think then look at the if statements -- how is it that we end up with yellow, magenta, and black, based on the green value.

The other interesting thing: the boy with prior blocks experience, William, at some point exclaimed his realization that the code was testing for 'greenness.' This is very interesting to me, since he had blocks experience, and yet for him too I think the question of '3 X's' was clearly engaging and it also became apparent that he didn't know that this this code was testing for greenness at first.

At this point John started doing a group demo, and we watched. I think Ravenna understood this color-to-number decomposition (and I was glad we did that before the group demo, as the class is mostly eager young boys who, as John and I discussed, could be 'overconfident') and there was clearly some transfer. After the demo, we didn't really have enough time to code something. I spent a while trying to get a grumpy cat image to be a png, which took more time than I wanted and our GP crashed on trying to duplicate a block (I think a 'let' block) but it was clear as we built the first 'if block' that Ravenna was following along. We got a first conditional to work on changing colors in the png, but then we ran out of time.

The other interesting thing about this story is Ravenna was perpetually convinced that she wasn't understanding what was going on. This was really interesting to me, since she was carrying on a conversation with me with no trouble about what the algorithm was doing, and clearly getting it. So somehow this conversation which served to me as evidence of learning didn't work for her. I assume this is because she didn't get to snap the blocks together herself -- my goal was to snap something together and then hand it over but we ran out of time -- and there's perhaps the cultural affect of nerdy young boys doing Scratch which doesn't map on to her own self-image. She only has an iPad at home, but no computer, and I have to imagine this is huge as she was interested in doing GP at home. I'm going to suggest P&C do some 1-on-1 work with her and we'll see.

Harlan got spacier by the last 20 or 30 minutes, but that he was engaged for so long up to that point was awesome to me. Having a constructive step for him is I think very meaningful in his time at P&C. I think part of the hook for him was that images and manipulating them has a real kind of Instagram-like power to it. It feels real. One of my internal heuristics is 'kids like power,' and maybe this can be modified to 'teens like social power.' One of the theories with Harlan is that he is hitting an early adolescence at 9 and this is why he is socially out of sync with his peers. In the same way, it seemed to me like he had more of a relationship to this class that was 'this feels real!', as opposed to playing with an abstract system solely for the joy of it like some of the other kids. (He is very interested in his digital camera right now, and I think prompted by John's demo, Harlan also proceeded to zoom way in on a picture and his camera and point out the pixels to our group.)

So great!

An alternate design that might help make things clearer:

alternate design for interactive program design

When I sent this demo out to my colleagues, one of them (Toby Schachman), riffed on my dmo and mocked up these physical versions:

paper and pen prototype showing an alternate design animated stop-motion design of pixels being sorted