This is BrainLog, a blog by Dan Sanderson. Older entries, from October 1999 through September 2010, are preserved for posterity, but are no longer maintained. See the front page and newer entries.

July 2008 Archives

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.

July 29, 2008

Alan Kay on How We Teach Computing, and other things.

July 11, 2008

In case this helps anyone else: I attempted to upgrade my iPhone to the new 2.0 operating system that was released this morning, but the phone is failing to re-activate due to "an error in the iTunes Store," leaving my phone completely disabled. I can disconnect and connect the phone from the computer to retry, but retries are failing.

So far I'm assuming this is a service outage on Apple's part due to 6 million people trying to upgrade simultaneously (and a complex upgrade process that does not properly handle this case), and I'll be able to complete the process later today. If you haven't upgraded your phone yet, you might want to wait until later today or tomorrow.

Update: Turning the phone off and on seemed sufficient, plus the fact that their network troubles have died down.

July 8, 2008

Two films by Michael Levy: Giant Steps, One.

July 4, 2008

If you thought gas prices were rising too quickly, check out what's been happening to text messaging.

AT&T announced the new iPhone rate plans, which do not include SMS. The only way to add SMS to one of the new family plans is to pay $30/mo for unlimited SMS. At the new 20 cents per message rate, you break even at 1500 messages (for all phones on the plan).

Old iPhones can still get 200 messages/mo per phone included in the unlimited data plan, even if you're activating new service with pre-owned devices.

July 3, 2008

MacGyver Gets Lazy.

Via the alt text: List of problems solved by MacGyver.

And a reminder: You can watch MacGyver on the CBS website. It's not as good as you remember, but it's there.