If you went to school in the 1980′s, this post may remind you of a forgotten favorite. A staple of Computer Education at the time, the Logo programming language is a simple, and still widely available, tool for teaching students about code. Known for its turtle graphics, Logo has a limited set of instructions (i.e. primitives), and is therefore a great gateway to programming. For example, here is code to draw a rectangle:
FD 70 RT 90 FD 130 RT 90 FD 70 RT 90 FD 130
Here’s a more slightly more elegant program for the same rectangle using the REPEAT command:
REPEAT 2 [FD 70 RT 90 FD 130 RT 90]
The use of virtual turtles allows for immediate visual feedback for students, which motivates debugging and problem solving. Because Logo was designed as a tool for learning, the error messages are descriptive. For example:
REPAT 2 [FD 70 RT 90 FD 130 RT 90]
I don’t know how to REPAT
If you give students 5-10 minutes of direct instruction on the programming language (e.g. “Here’s what the turtle understands…”), then give students a task (e.g. “write a program to construct an equilateral triangle”, or “make nested polygons”, etc.), and we think you’ll love the results. You can find a lot of tasks and lesson ideas here.
The turtle graphics were originally added to the Logo language in the late 1960s to support Papert’s version of the turtle robot, a simple robot controlled from the user’s workstation that is designed to carry out the drawing functions assigned to it using a small retractable pen set into the robot’s body.
A modern version of this type of robotics programming can seen here: Nao Robot Writes on a Whiteboard. Python is to Nao, as Logo is to Valiant the Turtle.
The University of California at Berkeley version of Logo (UCBLogo) is the best free version we’ve found. It’s also great for the upcoming “an hour of code“.
Despite it’s simplicity, Logo also has significant facilities for handling lists, files, input/output, and recursion. Simple enough for absolute beginners to be able to successfully program in 1-hour, it’s also advanced enough to be used for teaching most computer science classes. UCB’s recently retired Brian Harvey has written a trilogy of books proving this. Computer Science Logo Style is available for free from Berkeley’s site.
Computer Science Logo Style
Logo 3D - http://sourceforge.net/projects/logo3d/