July 30, 2008

Introducing Cologo

Cologo is a web-based tool for learning about and experimenting with computer programming. You write programs using Google Spreadsheets, and run them using a "gadget" inserted directly on the spreadsheet. Cologo runs entirely in a web browser, with no software to download.

Multiple people can work together on a Cologo program over the web simultaneously using the collaborative features of Google Spreadsheets. The gadget updates in real time as you and others make changes to the spreadsheet, allowing you to see the results of the changes immediately. You can share and publish your finished programs as read-only spreadsheets with the Cologo gadget on it, so others can see the program running and read the code. You can also embed the gadget for a program on a web page, or in any gadget container such as iGoogle, MySpace or Orkut.

A Cologo spreadsheet can include code, data and documentation all on one sheet. Cologo identifies which regions of the sheet represent code using a simple layout syntax that allows for procedure definitions to appear anywhere on a sheet, even alongside tables of data. You can also use text formatting to highlight the source code without affecting how the program works.

Cologo is an implementation of Logo, a programming language created in 1967 for educational use. Cologo is largely based on Berkeley Logo, a thorough implementation of Logo developed at UC Berkeley by Brian Harvey and his students. Brian Harvey is the author of an excellent series of books entitled Computer Science Logo Style, which uses Berkeley Logo to illustrate computer science concepts. The complete text of these books is available on the Berkeley Logo website. This initial release of Cologo implements a subset of Berkeley Logo that works with many of the examples in these books, with minor changes to syntax.

Logo is often associated with "turtle graphics," a mechanism for drawing pictures using procedures. Cologo includes a turtle graphics system. The turtle graphics feature works with Firefox, Safari and Opera. (It should also work with Internet Explorer using an HTML canvas plugin, though I haven't tested this yet.) The book Turtle Geometry by Harold Abelson and Andrea diSessa explores mathematical concepts using turtles, and many of the examples in this book can be ported to Cologo. (Be careful to avoid infinite loops, which Cologo doesn't quite handle well yet. If you're entering a procedure that loops indefinitely, include a wait 1 statement in each iteration to enable Cologo's "stop" button.)

The main goal for this initial release (version 0.1) is to validate the concepts of writing a computer program in a spreadsheet, and collaborating with others on a program using Google Spreadsheets. If these concepts prove successful, future versions may include more language features, performance improvements, and more sophisticated interaction with Google Spreadsheets. Eventually I hope to add a way for Cologo programs to modify their own spreadsheets, such as for storing data or making self-modifying programs.

See the Cologo website for a live demonstration, the code for the demo, and instructions on getting started. I'll be adding more documentation as time allows, though to be honest I've already spent too many evenings and weekends on this and I think I'm going to take a break. :)

Please give it a try, and let me know what you think. If you'd like to get involved, consider joining the Cologo Google Group. I'm especially interested in hearing from teachers that might want to try using Cologo in a classroom setting.

post a comment...