Sunday, February 07, 2010

Turtle Art - higher ceiling

A good learning environment for self-directed learning has a low entry, wide walls and high ceiling. That is, it is easy for beginners, can facilitate a wide range of creative efforts and is unrestricted in top end complexity.

Turtle Art for the Sugar operating system started out as a nice little, Logo like, drawing package
for young learners. Its Turtle and Pen pallets allowed young learners to draw geometric shapes, solve problems and learn a bit about geometry and logic.

Its Scratch like interlocking program blocks made programming foolproof.

Maybe a year ago, Walter Bender introduced the Portfolio pallet, which allows the integration of multimedia into this simple programming language. This extended the use of Turtle Art into literacy activities.

Python programmable blocks were also added, this extended the ceiling, there was no effective limit to the top end functionality. There is however a big leap from drag and drop progam blocks to object oriented Python which limits the usefulness of these blocks.

Recently Walter and Raúl Gutiérrez Segalés have done a major rewrite of Turtle Art, the pre-release version (at the time of writing), version 83 is here. Variable names and block stack (subroutine) names are now themselves variables. These variables can be numeric or string and the + operator can concatenate both data types. This greatly increases the power of Turtle Art while staying with familiar drag and drop block programming.

The program shown above above creates a 10x10 array of variables. The variable "index" contains a string RnCm where n and m are the row and column. The variable "index" is used to name 100 variables named R1C1 to R10C10 which have the value Row x Column stored in them.

A variable "subroutine" or stack name is also used. On the first pass, "runarray" calls stack "doit" to create the array and initialise the array values on the second pass it calls stack "printit" to display the array values.

Now a wide range of sophisticated programming is possible. For example, Turtle Art could compute fractals but the slow execution of the underling Python interpreted language is a major limitation.

Labels: , , ,


Post a Comment

<< Home