Learning Logo – Part One
Table of Contents
I decided last spring that it was a good time to begin teaching my eldest daughter how to program. She was eleven at the time and had demonstrated both interest and aptitude. So after researching various programming languages, I chose to use the Logo programming language – specifically, Berkeley Logo.
There are many good programming languages to choose from to teach children how to program depending on their abilities and interests, but I felt the benefits of Logo gave it the edge. It has much of the power of the Lisp family of languages but with a simpler syntax. The syntax is very uniform which saves children from having to learn too many inconsistent oddities of other languages (including my current favorite, Ruby). I had a preconceived idea that Logo was primarily about turtle graphics, so I was quite surprised when I dug a little deeper and found a very expressive language built on a solid foundation. Having said that, I think the availability of turtle graphics in Berkeley Logo is a big plus for allowing visual feedback for children.
In August, I wrote a blog post comparing a short function (from Brian Harvey’s home page) in Logo and several other languages. Several people added other versions in the comments. It may give you a glimpse of the conciseness and expressiveness of Logo.
In deciding on a programming language, I purposely ignored IDEs. In fact, I’ve discovered that more powerful languages are much less dependent on the availability of good IDEs. For example, when I switched from Java to Ruby, I didn’t miss Eclipse at all, and I’m much more productive with Ruby and a good text editor than I was with Eclipse and Java. On the other hand, I’ve heard some glowing testimonial from Smalltalk and Lisp IDE users, so I expect I’ll be experimenting with Lisp IDEs in the future.
Many thanks to Brian Harvey of UC Berkeley both for UCBLogo (along with other contributors) and for making excellent teaching materials freely available.
On Ubuntu Linux, simply install the ucblogo package. This will also install a PDF reference manual for Berkeley Logo which I recommend becoming familiar with.
You can also find links for other platforms on Brian Harvey’s home page.
Here are links to the free text books:
Computer Science Logo Style Volume 1: Symbolic Computing
Computer Science Logo Style Volume 2: Advanced Techniques
Computer Science Logo Style Volume 3: Beyond Programming
There is also a comp.lang.logo usenet group. You can access that via an nntp reader, or via Google below:
My teaching methodology thus far has simply been to have my daughter read a chapter, and then complete a short assignment of questions and programming exercises that I’ve designed to ensure she’s mastered the important concepts in the chapter. I’ll spend some time with her explaining the solutions to problems she may have missed.
If there’s interest, I can provide the complete set of chapter assignments including questions & answers and programming problems & solutions once we’ve completed volume 1. Feel free to leave a comment, if you’d like a copy.
Here are some quotes from the preface of “Computer Science Logo Style vol 1” to whet your appetite 🙂
The truth is that Logo is one of the most powerful programming languages available for home computers.
In Logo there is only one syntax, the one that invokes a procedure.
More powerful languages are based on some particular mathematical model of computing and use that model in a consistent way. For example, APL is based on the idea of matrix manipulation; Proglog is based on predicate calculus, a form of mathematical logic. Logo, like Lisp, is based on the idea of composition of functions.
I highly recommend learning Logo whether you’re teaching your children to program or you simply want to learn another programming language. I’ve found both to be beneficial to my professional programming career. The Berkeley version of Logo is very powerful and has the following special features (from the intro to the UCBLogo reference manual):
- Source file compatible among Unix, Windows & Mac
- Random-access arrays
- Variable number of inputs to user-defined procedures
- Mutators for list structure
- First-class instruction and expression templates
I’ve entitled this Part One because I intend to follow up with some more posts as we become more familiar with the language.
We’ve also been dabbling in some simple robotics projects. I would love to find a robotics controller, or kit, that allows programming in Logo – if anyone knows of such a thing, please let me know.
Happy programming 🙂