The Core of Computer Science: Alan Kay’s “Triple Whammy”

May 24, 2010 at 1:48 pm 7 comments

My aunt and uncle were in town last week.  My aunt told Barb and me how many of her friends’ computers were “destroyed” by “watching a YouTube video.”  “It almost happened to us, too, but we got a phone call telling us not to watch that video!”  Sure, there is probably a website out there that can trick users into installing a virus that can cause damage to their computer, and it may have a video on the website.  But I have a hard time believing that simply watching a video on a website like YouTube might “destroy” one’s computer (or more specifically from her explanation, erase one’s hard disk).  Belief that that could happen seems like a belief in magic and mythology, like the belief that a chariot draws the sun across the sky.  We ask everyone to take classes in history and biology, because they should understand how their world works, whether or not they will major in those fields.  It’s part of being an informed citizen who does not believe that the world runs by magic and myths.  What does everyone need to know about computer science?

Alan Kay and I were having an email conversation about this question, about what was the core of computer science that everyone ought to know about, even non-majors.  He came up with a “triple whammy” list that I really like.  It may need som re-phrasing, but there’s something deep there.  I’m copy-pasting his notes to me (repeated here with his permission) in italic-bold, with my intepretation and commentary between.

It is all about the triple whammy of computing.
1. Matter can be made to remember, discriminate, decide and do

In his book Pattern on the Stone, Danny Hillis points out that modern day CPU’s are just patterns on stone, essentially the stuff of sand.  We are able to realize YouTube and eBay and natural language translation and Pixar movies all because we can make patterns on stones that can remember things, distinguish between options, act on those distinctions, and do things from playing sounds to actuating robots.  This feels like magic, that matter can do those things, but mechanical engineers would find this first step unsurprising.  They know how to make machines made out of matter that can do these things, even without modern computers.  Whammy #1 is an important step away from magic, but isn’t yet computer science.

2. Matter can remember descriptions and interpret and act on them

In step 2, we get to programs and programming languages.  We can describe processes, and our matter can act on those descriptions.  While we can do this with steam engines and mechanical engineering, it’s complicated and not obvious.  We do this regularly in computer science.

3. Matter can hold and interpret and act on descriptions that describe anything that matter can do.

This third step is amazingly powerful — it’s where we go meta.  We can also describe the matter itself as programs.  Now we can create abstractions on our programming languages.  Now we can point out that any program can be written in any programming language.  This doesn’t directly address my aunt’s misconceptions, but if she understood the third whammy, we could talk about how a badly written media player could interpret a nefariously designed video such that the video could instruct a too-powerful media player to trash a hard disk, but how unlikely that would be.  This third step is where we get to the role that computer science can

The Triple Whammy isn’t all of computer science.  There is a lot more than these three steps.  For example, I think that everyone should know about limits of computability, and about the possibility of digitizing information in any medium (thus allowing for visualization of sound or auralization of stock market data).  I do see the Triple Whammy as part of a core, and that this could fit into any CS1 for any student.

We definitely talk about steps 1 and 2 in the Media Computation CS1, and parts of step 3. For example, we define a simple line-drawing language, then build an interpreter (just does each line-drawing statement) and a compiler (generates the equivalent Python function or Java method) for that line drawing language.  We do that in order to explain (in part) why Photoshop is faster than Python for any image filter we create.  But we definitely do not do this explicitly yet.  As I’m working on the Powerpoint slides for the Python 2ed book now, I’m thinking about building a “Triple Whammy” slide deck, to encourage teachers to have this discussion with their students in a Media Computation context.  I’ll bet that TeachScheme already gets there.

What I really like about this list is that it clearly explains why Computer Science isn’t just advanced use of application software.  We see adults and kids in our studies all the time who tell us that somebody really good at Photoshop is a computer scientist.  We hear from teachers and principals regularly who tell us that they teach computer science, because here’s the book they use for introducing Excel and Access.  The Triple Whammy is about computer science and not about using applications.

Entry filed under: Uncategorized. Tags: , , .

Happy 70th Birthday, Alan Kay! Fear and anxiety over curricular change

7 Comments Add your own

  • 1. Alan Kay  |  May 24, 2010 at 1:57 pm

    Not to claim too much for the “triple whammy”, but some of your first concern — “For example, I think that everyone should know about limits of computability” — and all of the second –“about the possibility of digitizing information in any medium (thus allowing for visualization of sound or auralization of stock market data)” — is contained in it.

    My feeling has long been that most computerists overbalance (to the point of harming what they are trying to do) by focusing on 2. and ignore the great powers of 1 and (especially) 3.



    • 2. Mark Guzdial  |  May 25, 2010 at 7:42 am

      Hi Alan,

      I think I see how to get from my two concerns to the Triple Whammy, but it’s not obvious to me. The first Whammy may be missing something like “which can compute anything which is computable.” That goes a long way toward establishing limits of computability, and even that any medium (assuming that anything humans can produce is the result of a computational process) can be represented in this matter. I don’t see how the “digitizing anything” concern is currently in the Triple Whammy, but I do see that there are a lot of potential implications of these statements and I’m just missing how they play out.


      • 3. Alan Kay  |  May 25, 2010 at 8:25 am

        Hi Mark,

        I think of these in “curriculum order”

        1. I like the Danny Hillis/AK Dewdney approach of showing how matter at human scale can do all these things. So to me this is a progression of doing logic with levers, ropes, hydraulics, gases, etc., and finally moving towards putting lots of elements together to make a memory and then a simple computer.

        And we have the nice pretty good analogy today that MOS acts very much like blowing up balloons which press against switches …. so we can make really good human scale logic elements using gas pressure as voltage….

        2. There’s lots of programming that can be done with this computer, and I like the idea here of using something like Wirth’s “elementary notation for algorithms” that is essentially a readable machine code (so it directly maps to the physical computer, but is much more readable than assembly code).

        This is where I would do quite a few of your early media computation examples. This is the start of thinking about how to represent ideas in the raw computer as combinations of states and processes.

        3. Here’s where I would explore the big whammy of universality. First by making an OMeta like bootstrapper, then a few little powerful languages, with more powerful media computation, etc.

        Then look at the universality of representing forms with bits. Then look at the universality of representing all processes/knowledge that we can describe.

        I would ask questions about limits, and especially philosophical ones that trade off mathematical properties (Goedel limits etc) vs the pragmatics of being human with a finite lifespan (i.e. many limits of computability are not that interesting or applicable if there is a human involved). For example, the halting problem is not particularly relevant or useful for pretty much any of the computing we do today.



  • 4. Erik Engbrecht  |  May 24, 2010 at 2:08 pm

    I know this is tangential to your post, but…

    From a practical perspective a virus erasing your harddrive might be a kindness. I once got a computer virus that ultimately in order to erradicate I had to low-level format my harddrive. Simply reformating it wasn’t enough. Virus scanners would claim disineffect it and fail.

    A lesser virus can easily cripple Windows to the point were restoration costs more in terms of labor than purchasing a new computer. I think the time I spend tracking down viruses (and possible viruses) on my wife’s Windows laptop accounts for 90% of the lifecycle cost of the computer.

    Anyway, my point is that something that literally erases the harddrive, and something that causes a “computer expert” to remove everything from the harddrive, aren’t really any different. The black art behind the virus may be different, and of curiousity to we techies, but to the average user it’s all the same.

  • 5. Matt Glickman  |  May 26, 2010 at 8:58 pm

    Hi, Mark –

    Use of the word “matter” instead of something more specific seems like an invitation to imagine the simplest example of each level in the triple whammy progression. #1 might be seen in any artifact with that responds to environmental conditions via state-type behavior, so something as simple as light switch might technically fit the bill.

    A player piano might do it for #2, or perhaps a mechanical music box (an example of media computation as well?). A player piano that included the record-a-new-tape function might be a richer example of whammy 2.

    What really strikes me is that to get to #3, it seems like you need something remarkably more refined. A universal Turing machine is perhaps the theoretical minimum. As far as real-world instantiations go, however, it seems like you need a full digital computer. The only other examples I can think of are biological: (a) the core molecular machinery of a cell (in that the apparatus that interprets the genome is itself encoded within the genome), and (b) nervous systems of sufficient richness (although I think our understanding of how they accomplish #3 is still pretty impoverished).

    Two other notes:

    (1) I agree that being able to reason about the likelihood of encountering self-replicating code is a great level for non-CS folks to reach, I’m afraid the flash player and video are too opaque of an example. A clearer example might be, perhaps, thinking about how rich Microsoft Word’s macro language had to become before it became a fertile medium for virus propagation.

    (2) As long as we ignore any macro language that might be present in Photoshop, I suppose Photoshop would only represent CS Whammy #1, i.e. a state machine, albeit a very complex one. It’s true that the ability to interact with such an artifact doesn’t amount to computer science, but I think you’d probably agree it at least counts as a computational skill, and a really important one for a large number of people in our society to acquire.

    Thanks for the post!

  • […] deep-down what computing is about, reflected in Alan Kay’s “Triple Whammy” that everyone should know about computing.  Is that mathematics?  It’s not the […]

  • 7. Joe Davison  |  April 7, 2011 at 10:03 am

    I think one has to be careful with phrases like ‘digitize anything’. That’s where the magic comes in.

    One can ‘digitize a representation of anything’ and, probably, one can ‘digitize any representation’ — or ‘digitize any information’. But digitizing a representation of (a rock, a glass of wine, me) is not the same as digitizing (a rock, a glass of wine, me).

    If you want to build a computer that rides a bicycle, it has to have sensors that interact with the actual world, not just with representations of the world. The sensors may ‘simply’ connect a representation with the actual world, but the actual world cannot be ignored.

    Or, as the Tao Te Ching puts it: The way that can be computed is not the actual way.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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

Trackback this post  |  Subscribe to the comments via RSS Feed

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 8,460 other followers


Recent Posts

Blog Stats

  • 1,861,952 hits
May 2010

CS Teaching Tips

%d bloggers like this: