Computer Programming Workshop Recap
I had the chance yesterday to share a little bit about Scratch and Processing to a few different kids and adults. It was great! Leading up to the workshop I’d been kind of stressed out about a bunch of different tasks and projects, and I felt like I hadn’t quite given enough thought to how I was going to run things.
It turns out that Scratch and Processing are both really well put together tools, and that, when you give interested and creative people tools and instruction that don’t get in between them and their ideas, really awesome stuff can happen without a lot of push from central authorities or teachers. I know this, and I’ve known it for all of the years that I’ve been teaching kids and working with computers, but I’m still continually and newly impressed by how well Scratch just-works.
We had a nice age-range and ability-range, too, so we had an older kids helping younger kids and also helping unfamiliar adults. Skill-based learning really naturally brings out the helpful teaching instincts in people who have the skills in a way that’s really social and really fun – normal prejudices about age and competence fall away, and you work and talk with whoever can help you and whoever you can help.
I’ve taught people Java and Processing, and I’ve taught people Scratch, but yesterday was the first time that I’d really helped an expert Scratcher move to using a text-based language, so it was the first time that I really appreciated how well the structures and design patterns in Scratch model the structures and design patterns of functional programming.
Here is a drawing program made in Scratch:

and here is essentially the same program in Processing:

Java isn’t the most readable thing in the world, but anyone can look at these two blocks of code and see that they do pretty much the same thing, and have pretty much the same structure. Even visually, the sorts of things that you surround with curly-braces in Java are the sorts of things that are constrained inside of blocks in Scratch. The Processing draw() function corresponds to the Scratch forever-if structure, When-flag-clicked is pretty much the same thing as setup(). These things seem really obvious in retrospect, but the correspondences were particularly powerful for me yesterday when I was trying to explain Java/Processing to an expert Scratcher who’d never typed code before.
And he was excited by what he was doing in Processing. He was excited about drawing lines and smiley-faces and boxes and moving circles, and he was rightly and legitimately excited. I’ve talked to a number of programmers who worry about whether Scratch “dumbs down” coding – whether it provides an easy and addictive sense of gratification that ultimately doesn’t go anywhere, and whether being able to easily make a certain class of impressive things in Scratch might limit people’s patience for some of the more abstract hard work that has to go, initially, into making less straightforwardly impressive things in a “real” programming language.
My intuition to this question has always been that it’s a pretty dumb worry – that it’s always good to help people make the things they want to make, and that if people want to make different things they’ll learn how to make them and if doing so involves mastering a new tool they’ll master the new tool, and that the thought and design patterns that go into making stuff in Scratch are sufficiently similar to those that go into hacking in other languages that Scratch experience is gonna be really helpful for anyone learning to program. It’s nice to have a concrete experience to back up this intuition, though.
This did make me think again about a question that’s been floating around in my mind for a while – why is the ability to make and define new blocks seemingly really low on the Scratch priority list? The “function” was the one key programming concept that I wanted to introduce that didn’t have a really clear Scratch analogue. The canonical Logo examples that I was shown when I was a kid involve defining functions and then defining more interesting functions as collections of less interesting functions. A house made out of a square and a triangle. A square and a triangle made out of sets of lines. Or, more excitingly, a tree made out of lots of little trees. It seems like Scratch’s spiritual heritage (Logo, Lisp, the MIT AI Lab) was really into recursion as a fundamental concept – I wonder why it’s not more straightforward to do in Scratch…