Tinker: a programming by Demonstration System for Beginning Programmers by Henry Lieberman Media Laboratory Massachusetts Institute of Technology


From An "Instant Turtle" To An "Instant Programming Language"



Download 177.19 Kb.
Page4/15
Date06.04.2021
Size177.19 Kb.
1   2   3   4   5   6   7   8   9   ...   15
From An "Instant Turtle" To An "Instant Programming Language"

Before getting to the details of Tinker, I would like to introduce the approach by relating how my interest in example oriented environments for beginning programmers grew out of my earlier work with Seymour Papert's group at the MIT Artificial Intelligence Laboratory. This group developed the educational language , derived from the AI language Lisp, and now available on most microcomputers. Despite Logo's initial success in teaching children techniques of learning and problem solving, we found that teachers experienced some difficulty introducing Logo to younger children.

The kids had little difficulty learning about the , a graphics cursor they could use to draw pictures using commands like Forward 100 and Right 90. Teachers would introduce Logo to students by having them type these commands to the computer and watch the responses of the turtle. Often, the biggest hurdle was that the children were very slow at typing on a keyboard.

The following sequence of turtle commands could draw a triangle.

Forward 100


Right 120
Forward 100
Right 120
Forward 100
Right 120

But trouble came when the teachers tried to introduce the notion of procedures. The simplest notion of a procedure is introducing a name for a group of turtle commands, using the Logo command To. To make a procedure that draws a Triangle, the student must say

To Triangle
Repeat 3 (Forward 100 Right 120)
End

But when the student types Forward 100 this time, the turtle doesn't move! Why not?! Was something wrong with the computer, the student wondered? The teacher then had to patiently explain that the computer was just remembering that it was supposed to do the Forward 100 as part of the Triangle procedure, and you couldn't actually get it to do anything until you finished the procedure [with End] and called it by typing Triangle. But this explanation seemed very abstract to a beginner, who was just trying to learn the concept of a procedure.

Furthermore, it seemed to require that you type everything twice! Once you performed the turtle commands that drew a triangle on the screen, why did you have to type those commands all over again just to have the computer remember them to make a Triangle procedure?

The teachers came up with a very ingenious solution to this. Around 1971, teacher Cynthia Solomon wrote , an interface to Logo that introduced the notion of a procedure as a remembered set of turtle commands. Whenever the student typed a turtle command, it would always be remembered in a list. A new command, Teach, would take the current list of turtle commands, and make a procedure out of it, asking the student for a name. This new procedure was then available as another command. Teach in Instant Turtle was probably the first instance of a " recorder", now common in spreadsheets and word processing programs.

This turned out to be an enormous success. A student could issue the turtle commands for drawing a triangle, and get the immediate feedback of seeing the triangle appear on the screen. The student could then simply do Teach Triangle to make a triangle procedure, without retyping the Forward and Right commands.

This is a very simple kind of "programming by demonstration", since the triangle drawn on the screen serves as an example of what the Triangle procedure will do. Even if the procedure did not have arguments, a triangle drawn the next time the procedure was called still might be different, appearing at a different place on the screen or in a different orientation. Showing the computer how to draw an example triangle could be used to teach the machine how to draw triangles in general, just as showing a person an example of how to perform a procedure can help them learn that procedure.



But Instant Turtle was very limited in its expressive power, and as soon as a child gained mastery of basic turtle manipulation and the concept of a procedure, it was time to move on to full Logo. After all, Instant Turtle couldn't define procedures with input s procedures that called other Logo procedures or that called themselves recursively, or that contained . But moving from Instant Turtle to full Logo loses the immediacy of defining procedures from remembered sets of interactively executed actions. Is it possible to create a programming environment as friendly as Instant Turtle, but for a language as powerful as Lisp? Could procedures be defined by demonstrating them on concrete examples, always giving the user immediate , without sacrificing ? This is the motivation that led to my work on Tinker.





Share with your friends:
1   2   3   4   5   6   7   8   9   ...   15




The database is protected by copyright ©essaydocs.org 2020
send message

    Main page