Programming without math, part 7

Combining some “natural language” and blocks-world ideas from Terry Winograd’s SHRDLU with the dragging tiles concepts from Mitch Resnick’s Scratch, we might end up with something like this:

Here some snap-together tiles have been arranged so as to instruct the computer what to do if somebody clicks on the green ball. In particular, if the green ball is clicked on, it will roll over to the red square. Note that there are three different shapes for the tiles: A diamond shape means either true or false, a rectangle shape refers to a property (like red or green) and a rounded shape refers to an object (like a ball or a square).

I realize this is a very simplified example. In reality this little snippet would be embedded in a game, or a puzzle, or some larger world of goals and challenges. I’ve taken away all that context so we can focus on the actual operations involved.

Like Mitch Resnick’s Scratch program, this snap-together-tiles approach avoids syntax errors, since tiles will only snap together in ways that make sense. This avoids one of the problems of Winograd’s SHRDLU — that people might type all sorts of English sentences that a computer wouldn’t understand.

Here is a set of tiles that you might draw from to build the above set of instructions:

Just as in Mitch Resnick’s Scratch system, the tiles are stretchy – when you insert a tile into a waiting slot of another tile, the slotted tile accommodates by growing larger so that the inserted piece will fit.

To make the instructions seen in the first picture, you could insert tile 2 into tile 1. Then insert tile 3 into tile 2. Then insert tiles 4 and 5 into tile 3. Then snap tile 6 into place below tile 1. You can easily figure out the rest for yourself.

Playing around with these tiles, I find them to be fun and intuitive. They seem to do a good job of mimicking the way we generally think about getting things done — by gradually building up tasks from simple steps.

2 thoughts on “Programming without math, part 7”

Leave a Reply

Your email address will not be published. Required fields are marked *