Institute for Personal Robots in Education Blog

Doug Blank's blog

Experiments in Dynamic Dispatch

In implementing a language like Scheme in a language like C#, you might want to write code like this:

public class Test {
    public static object multiply(object o1, object o2) {
	return o1 * o2;
    public static void Main() {
	System.Console.WriteLine(multiply(1, 3.0));

That is, you'd like to multiple an int times a double and have the system's type system figure out what to do. However, C# 3.0 and earlier didn't support such "dynamic dispatch". If you try to compile this with Mono:

mcs Test.cs

you'd get the error:

Test.cs(3,19): error CS0019: Operator `*' cannot be applied to operands of type `object' and `object'

Picasso's Dog

Thanks to Julia Ferraioli for a link to Math ∩ Programming. This post on Bezier Curves and Picasso translates nicely into Calico Python (code below). Makes an interesting discussion, even for younger students, using Calico Jigsaw (inspired by Scratch, code to right).

Distributed computing with Calico

This example shows off some of the new features in the latest Calico, version 2.3.5: you can programmatically create a spreadsheet, put data in it, collect data from other users, and make the data available on the web. This might be a way of collecting data in a classroom activity (perhaps measurements of some kind), or perhaps a multiplayer game. The program below is what the teacher might show on the screen, as it shows the spreadsheet as it changes as new data comes in from the student.

You can download the latest Calico from

Calico 2.0.4: Control real robots with Logo

There is a new version of Calico, version 2.0.4, ready for download. This version fixes a few bugs, new examples (such as accessing the Arduino), and adds a new language (Logo) for Calico. Additions to this version include:

  1. Robot simulator fixed on Mac (issue with Cairo.Context) (Reported by Keith O'Hara)
  2. Select languages to load at startup time from menu (need to restart Calico)
  3. Icons on toolbar are now smaller to allow more room on screen (suggested by Mark Russo)

Interactive Arduino Programming with Calico

In the Fall 2012 semester I'll be teaching a quarter course (1/2 semester) on Physical Computing at Bryn Mawr College. As an experiment, I thought I'd explore programming an Arduino, but I'd like to start out programming interactively rather than jumping straight into embedded systems using C.

Processing is the basis for the standard method of the Arduino programming environment, and also Processing can be used to talk to an Arduino board directly. I wondered if Calico could be used in the same way.

The Pyjama Project

The Pyjama Project is a framework for learning, doing, and playing with computation. At its core is an integrated editor, interactive console, and social interaction framework for exploring computer science through modern, dynamic languages. It is designed to be a simple, yet powerful, integrated development environment (IDE) for students, teachers, researchers---and regular humans, too! It runs on most any operating system, including Linux, Mac OS X, and Windows. All sources for the Pyjama Project are open and free---freely available and you are free to use them in various ways.

Pyjama has three main types of users in mind: the educator, the learner, and the scripter.

Pyjama for the Educator

Pyjama is a framework for educators to instruct, gain insight, and to explore better methods of teaching.

Pyjama is ready to use for instruction, and includes useful functions for teaching in the laboratory setting:

  • Start with a drag and drop language, like Dinah, and smoothly migrate to a more sophisticated text-based language, like Python, and continue to a type-based language, like Boo or C#, and end with a sophisticated language, like Scheme, all in one environment
  • Context modules (like Graphics and Robotics) are the same across languages
  • Integrated Chat - students and teachers can communicate whenever they are working
  • Script Blast - users can Blast code to each other, both to just run, or to pop up in their editors
  • Checkpoints - using Script Blast, instructors can send students interactive questions to get feedback on understanding. A simplified version of Classroom presenter is possible
  • Follow along instruction - using Script Blast, instructors can send their lecture "slides" so students can follow along (or rewind) on their own screens
  • Window design - windows designed for easy presentation on projected screens
  • Script submission - code can be submitted easily to instructor
  • Logging - instructors can analyse logged data to explore time-on-task and other concepts
  • Development - teachers can create their own languages (at various levels of abstraction) to test their pedagogical effectiveness

Instructors can use the user checkpoint question feedback, chat questions, and log analysis to adapt, even on the fly.

Instructors can extend the Pyjama framework by developing their own languages, visualizations, or interfaces. For example, an instructor develop a new text-based language, or a language like Scratch; or they could develop an interface to objects, like BlueJ.

Pyjama for the Learner

Pyjama is designed for students:

  • choice of languages, from the simple, to the sophisticated
  • embraces social communication
    • chat with others, in their own conferences, or with everyone
    • chat with the instructor one-on-one
    • share code, by allowing others to run it, or see it
  • color syntax high-lighting for all languages
  • easy support for submitting assignments
  • integrated web page for exploring HTML and making a public space
  • code blast to help getting answers and asking questions

It is planned that Pyjama will support extended assistance for getting help with particular errors.

Pyjama for the Scripter

Pyjama is a nice environment for writing code, in general. It is planned to make Pyjama be an environment for exploring (and researching) ideas in computer science. For example, one can write in multiple languages, sharing data between them.

The Pyjama Project now embraces social interactions

We have been busy working on the Pyjama Project, our next version of our educational environment, and the Myro API to interact with robots.

As we have been redesigning the entire scripting environment from the bottom up, we have asked ourselves: what should a modern environment look like for learning about computing? There are many aspects to think about, but one that we have always considered was the social perspective.

Of course, most students are very familiar with social media: Twitter, Facebook, IM, IRC, and a host of other technologies designed to share and network. What could a programming environment do in this domain?

We have two answers: Chat, and Blast. Chat is fairly straight forward: allow students to easily communicate with the instructor and each other as they program. They are probably already doing that, so why not build it into the environment? We have experimented with this idea in the past, by designing a chat interface into Myro. This has allowed students to write programs that can coordinate with people, robots, and other programs (I just added a chess engine to Pyjama, so students can write the brains and play each other's chess programs over the Chat protocol). Students can send pictures taken from their robot to their associated webpage. It is really using the chat infrastructure as a networking protocol. We use XMPP, aka Jabber. It is a little slow as far as networking goes, but dependable and extendable. And pervasive! You can write a program to chat with your phone.

The second answer, Blast, is quite innovative, I think. The basic idea is that teachers have the ability to send programs directly to each other, or to a group of people. You can Blast a script to a student so that it shows up in their editor, centered on the line number you're discussing. Or you can Blast a program so that it just executes in the other's environment.

Want a checkpoint of the classes current understanding with a poll? Blast them an interactive survey question script, which gives you feedback. Want them to follow along with your lecture? Blast them an interactive set of executable "slides". Think of this as a sort of Classroom Presenter, but over chat.

But Blasting need not be only a teacher affair. What would students do if they could Blast code to each other? Would this end up being a cheating nightmare? What about security? Can we prevent people from sending destructive scripts? Or would Blasting be a really good way to learn? Would it drive motivation, and increase interest, attention, and knowledge?

We will see.

You can download Pyjama and try it out, in a variety of languages, including Python, Ruby, C#, Boo, and Scheme, at

Ada Lovelace Day: Dedicated to the Next Generation

Today is Ada Lovelace Day! In her honor, writers around the world have pledged to publish a note about a woman in technology who they admire. See for more info. It is impossible for me to only pick one woman in technology! For me, there are so many to choose from, including:

  • Lisa Meeden - professor at Swarthmore College who may be the best teacher in the world
  • Laura Blankenship - free-lance geeky mom/educational technological evangelist, who may be the best techno-geeky-mom/wife/friend in the world
  • Jane Prey - has made so many great things happen in my (and many people's) career

But, instead of picking just one woman, I'm going to cop-out and vote for the entire Next Generation of women who will change the face of computing, and take the field in exciting new directions. This includes:

To all of the women in the Next Generation, we salute you!

Robots killing people

In a recent article in GOOD magazine, Chris Csikszentmihalyi (pronounced "cheek-sent-me-hi") noted:

Among the many changes in U.S. policy after 9/11 was one that went unnoticed by everyone except a few geeks: The military quietly reversed its longstanding position on the role of robots in battlefields, and now embraces the idea of autonomous killing machines. There was no outcry from the academics who study robotics—indeed, with few exceptions they lined up to help, developing new technologies for intelligent navigation, locomotion, and coordination. At my own institute, an enormous space is being out-fitted to coordinate robotic flying, swimming, and marching units in preparation for some future Normandy.

Researchers study software gender gap

Two computer scientists have found an interesting difference between how men and women use software. From an MSNBC report:

Laura Beckwith, a new computer science Ph.D. from Oregon State University, and her adviser, Margaret Burnett, specialize in studying the way people use computers to solve everyday problems — like adding formulas to spreadsheets, animation to Web sites and styles to word processing documents.

A couple of years ago, they stumbled upon an intriguing tidbit: Men, it seemed, were more likely than women to use advanced software features, specifically ones that help users find and fix errors. Programmers call this "debugging," and it's a crucial step in building programs that work.

Syndicate content