Archive for programming

Visual Programming

Scratch from the MIT media lab is a neat workbench to create interactive movies via visual programming. You can create cartoons and associate a program with each cartoon. This program is not written but assembled form visual blocks (here is an example).

A Scratch Program

The program specifies how the cartoon moves around, how large it is, how it looks, what sounds and callouts it puts out etc. Loops allow this code to run forever and conditions allow variation over time/space (so you could say turn back on hitting the edge). You can even define your own variables, assign values, do numeric and boolean comparisons etc, so this is a full programming language represented visually.

Scratch is intended as a first (and friendly) introduction to programming. Children who have no idea what the blocks mean can try to fit them together (the block shapes ensure that if the blocks fit and there are no intervening voids then the program is valid) and see their effect on their cartoon. I will need to watch a few children take this on to see how well it works. But sounds like a great idea, good for building your own interactive games as well. I do wish though that the media labs folks had built it on the web as a flash/javascript program rather than use a client, it should be easy to just do this whole thing in flash.

Scratch does leave you wondering why all of professional programming should not move to this mode (easy to read programs, no typos etc, and a lot of pleasant colour, this is a tantalizing thought, maybe some day).