Tuesday, April 17, 2007

EToys (late binding)

The image comes from my replication of the Drive A Car tutorial from the squeakland website. You make a car and then write a script to make it move. Then add a steering wheel and modify the script to control the steering. The blue lines on the diagram originate from the pen down option, so I can see the path made by the car.

Late binding in EToys (Squeak) blows me away.

Variables and their values can be altered while an animation is running in front of you!! This has enormous educational implications in the teaching of important maths concepts.

The commentary in the Drive a Car tutorial is very valuable as well, particularly the points about:
  • the value of allowing children to play with icons while gradually and subliminally gaining fluency and appreciation of the power of symbols (described as the "Montessori game")
  • the relationship between play of this type and real mathematics: "It is our job to make lots of little aha's happpen during the play, not to disrupt the play. We are not trying to teach them specific math at this point, but how to be real mathematicians. The children have to play with math to do this."

Then, after listening to Alan Kay's 2003 ETech presentation, I become annoyed that something so educationally valuable that was invented decades ago in LISP and SmallTalk has been denied to generations of children.

For a video of Alan Kay doing this go to this page, scroll 2/3rds of the way down the page and download the video titled Kid Program (Med-res - 57 MB)

Alan Kay explains how late binding is also valuable for experienced programmers:

Most software is made by programmers creating text files that are fed to a compiler and loader which makes a runable program. One can tell how early- or late-bound a system is by looking at the things that can be changed while the program is running. For example, it is generally true of C based systems that most changes in the program have to be done by going back to the text files, changing them, and recompiling and loading them. This is even true of Java. Organizationally, this often leads to at most one or two system builds a day before most bugs can be found.

A late-bound system like LISP or Smalltalk can change pretty much everything while it is running -- in fact, both these systems are so good at this that their development systems are written in themselves and are active during runtime. For example, a program change in Smalltalk takes less than a second to take effect, thus many more bugs can be run down and fixed.

But late-bound has some deeper and more profound properties that include abilities to actually change the both the structure and metastructure of the language itself. Thus an important new idea can be assimilated into the constantly evolving process that is the system.

Another aspect of late-binding is the ability to change one's mind about already instantiated structures that are already doing work. These can be changed automatically on the fly without harming the work they are already doing.

Etc. Wheels within wheels.

These ideas are not new, but they are quite foreign and out of the scope of the way most programming is done today
EToys software is being distributed on the OLPC. Information and picture gallery


Tony Forster said...

Thanks for looking at Squeak in detail. Great quote "We are not trying to teach them specific math at this point, but how to be real mathematicians". A couple of questions:

How difficult is the entry into Squeak? How would a year 7 fare, how long to their first playable game? How does it compare to Game Maker?

How does late binding differ from debug mode? With debug mode, variables can be inspected and (I think) changed.

Bill Kerr said...

hi tony,

It's quite complicated comparing EToys/Squeak with Game Maker. I'll try to write a separate post about that. Also happy to talk about it, that might help me write the post too. I can't really say more now without starting to talk about the complications.

I just had a go at building the car tutorial in Game Maker. For that *particular* exercise it was much easier in Etoys/Squeak. But I haven't tried to build a Platform game in Etoys, so I'm not ready yet to compare them fully

Here are some online games written in Squeak (FYI but not introductory so doesn't answer your question)

There is no comparison between late binding and debug mode in Game Maker. In Etoys the default is that variables are displayed on the same screen as the animation and can be altered as the animation is running. No stopping, going into a different mode, altering values and then running again is required. The difference is huge. Also initialisation of variables is not required. Resizing and rotation can be done on the fly too, as a bi-product of the morphic halo of handles UI.

Bill Kerr said...


This project examples page contains descriptions of and links to squeak projects which can be run on line illustrating themes such as epidemic, forest fire, ants, gas tank, diffusion, predator / prey and pixels

This Welcome to Kedema pdf explains how it all works

Bill Kerr said...

Kedema is advanced

Here are some better projects to start with designed by 5th graders in New York - mazes, hungry fish, animations