Looking for a way to introduce programming to my sons, I downloaded MSWLogo the other day. Gee it’s fun.
Logo was designed as a teaching language. Logo is centred around the turtle and the drawing area. You give simple commands to the turtle –
forward 100 and
right 90 – and wherever the turtle goes, it leaves a line. You can combine these commands into simple programs, and with just a few lines of code, can draw some neat patterns.
I settled on MSWLogo, on the strength of positive comments from pages I found by searching for logo programming on Google. MSWLogo has a drawing window, a command window and a text editor (screenshot). What more could a junior programmer want?
Fiddling with Logo on the way home reminded me of my first, tentative adventures with Basic on the TRS-80 pocket computer. Logo is responsive and interesting – you can “make it do stuff.”
Time for an example. Here is the turtle on a blank screen:
The turtle is kind of triangular. According to one Logo text, its name is Ernestine. The turtle’s pen is tied to its tail, right in the middle of its flat backside. Now, using the editor, we rattle off a quick program:
repeat 4 [forward 50 right 90]
From the command prompt, we can now type ”
square”, and sure enough:
The triangle is, of course, the turtle, back where it started, in the middle of the screen. Now we can use our square in another program:
repeat 8 [
And here is what it looks like:
Not bad for a few lines of code. What I found most fun, though, was drawing fractals with recursion. This little routine draws a tree, splitting each branch in two.
to tree :size
if (:size > 10) [
tree :size * 0.8
tree :size * 0.8
tree 30” gives:
More complex fractals can be drawn with not that much more code. I even had it drawing the dragon curve in eight lines of code.
MSWLogo comes with an impressive range of demos. There are some 3d graphics, a bunch of games, and a Pascal compiler, written in Logo, that converts Pascal to Logo and executes it.
I’m glad I gave Logo a whirl. It stretched me, All in all, I can heartily recommend Logo as a fun toy for programmers. Logo encourages a different kind of thinking, and gives a big payback for a small investment.