Calico PDF
Calico PDF
Calico PDF
Computer Science
Department
Bryn Mawr College
Bryn Mawr, PA (USA)
(1) 610-526-6501
dblank@brynmawr.edu
Computer Science
Department
Rowan University
Glassboro, NJ (USA)
(1) 856-256-4593
Computer Science
Department
Sarah Lawrence College
Bronxville, NY (USA)
(1) 914-395-2673
Computer Science
Program
Bard College
Annandale-on-Hudson, NY
(1) 845-752-2359
kay@rowan.edu
jmarshall@slc.edu
kohara@bard.edu
ABSTRACT
The Calico project is a multi-language, multi-context programming framework and learning environment for computing education. This environment is designed to support several interoperable programming languages (including Python, Scheme, and a
visual programming language), a variety of pedagogical contexts
(including scientific visualization, robotics, and art), and an assortment of physical devices (including different educational robotics platforms and a variety of physical sensors). In addition,
the environment is designed to support collaboration and modern,
interactive learning. In this paper we describe the Calico project,
its design and goals, our prototype system, and its current use.
General Terms
Design, Experimentation, Languages.
Keywords
CS1, computer science education, integrated development environment, IDE, pedagogy, programming languages, robots.
1. INTRODUCTION
Today there are many new and exciting programming environments and contexts available for learning about computing. For
example, Alice [8] and Scratch [10] provide drag-and-drop, nosyntax-errors programming environments, and DrRacket (formerly DrScheme) offers an award-winning integrated error display and logging system for Scheme [11]. Likewise, there are
many exciting pedagogical contexts for learning about computer
science, including media computation [6], story-telling, game
development, AI, robotics, visualization, and art. Unfortunately,
Permission to make digital or hard copies of all or part of this work for
personal or classroom use is granted without fee provided that copies are
not made or distributed for profit or commercial advantage and that
copies bear this notice and the full citation on the first page. To copy
otherwise, or republish, to post on servers or to redistribute to lists,
requires prior specific permission and/or a fee.
SIGCSE12, February 29March 3, 2012, Raleigh, North Carolina, USA.
Copyright 2012 ACM 978-1-4503-1098-7/12/02...$10.00.
these contexts are often tied to a specific programming environment, which limits their availability to only those willing to work
in that programming environment. Similarly, picking a specific
programming environment often limits which contexts one can
explore. Ideally, educators should be free to choose the most appropriate programming languages and, independently, the most
appropriate themes and contexts for their courses. The choice of
programming language should not limit the context, nor should
the choice of context limit the programming language.
The Calico project is designed to provide a single framework
for multiple programming environments and multiple contexts so
that instructors and institutions need not limit their pedagogical
choices [3]. Thus, within a single framework, teachers can
smoothly transition students from one programming paradigm to
another. For example, perhaps an instructor would like students to
begin with a Scratch-like language [16] and then move to Python.
Or perhaps the instructor might wish to start with Python and
move to Scheme. Both of these transitions are possible in Calico
without changing the computing context, whether it be art, game
development, visualization, or any number of other possibilities.
Calico comprises four main components: an interface for
multiple programming languages; an interface for multiple libraries for exploring different computing contexts; an interface for
peer-to-peer communication; and an integrated editor. The language interface allows for the execution of individual language
expressions or entire program files, and for the sharing of data and
functions across languages. The library interface enables program
modules to appear as native objects within all of the available
languages. This provides a foundation for exploring computing
contexts, such as graphics and robotics, in a language-independent
manner. The communication interface provides functionality that
enables users to easily exchange information among themselves.
Finally, the editor provides a common framework for editing programs in any language, be it graphical or text-based.
We have developed a prototype version of Calico (Figure 1)
that provides well-tested support for the Python programming
language and a personal robotics context (called Myro) for introductory computing, as well as preliminary support for several
other languages and contexts. Calico runs on Linux, Macintosh,
and Windows. This paper describes the prototype version of
Calico, which is currently being piloted in five Fall 2011 CS
courses, as well as our broader goals and vision for the system.
In the ongoing development of the Calico framework, our
overall goals are to raise the ceiling by including a variety of
more sophisticated pedagogical contexts and programming languages, to lower the floor by including support for an intuitive
As an example, the following Calico Scheme program defines a recursive function for testing whether an integer is even:
scheme> (define is-even?
(lambda (n)
(cond
2. A MULTI-LANGUAGE ENVIRONMENT
Users interact with each supported language through the Calico
Shell. The shell provides a place for text-based language expressions to be entered and evaluated interactively, with the results
available for immediate inspection. In many ways, the shell is
very similar to other interactive interfaces, such as IDLE,
DrRacket, Jython Environment for Students (JES), and many
others going back to the read-eval-print loop of Lisp. However,
Calico offers three significant improvements over these other
interfaces: Calico is completely language-agnostic, users can easily switch between a variety of available languages, and different
languages can share data and functions.
Our Calico prototype currently fully supports Python as a
scripting language for students to use. Beyond support for Python,
there is preliminary support for Ruby, F# (similar to OCaml), Boo
(Python with types), and Scheme. The shell is language-agnostic
in that it is not tied specifically to any programming language.
Languages are dynamically loaded on startup through a simple,
standard interface. Once Calico is started, users may switch between loaded languages through a simple key combination (e.g.,
Control+5 might be Python, and Control+6 Ruby).
Of course, most users will probably only use a single language at a time; however, users can mix data structures and functions from different languages together. Furthermore, the sharing
of data and functions requires no extra overhead. For example,
data need not be marshaled (or copied) in order to be accessed
by different languages. In addition, functions defined in one language appear native to each of Calicos supported languages, even
if they involve very different types of execution mechanisms.
((= n 0) #t)
((= n 1) #f)
((< n 0) (is-even? (- n)))
(else (is-even? (- n 2))))))
Ok
In this example, is-even? is local to Scheme. However, this function can easily be made available to other Calico languages. The
following code adds the function even to the global environment,
turning the Scheme function is-even? into a function callable from
other Calico languages:
scheme> (define! even (func is-even?))
Ok
The user can then dynamically switch to Python, and call the even
function as if it were a native Python function:
python> even(9998)
True
3. MULTI-CONTEXT COMPUTING
We consider a context to be a unifying theme used to drive student
motivation. A context should be supported by well-designed curricular materials and libraries, and perhaps also by appropriate
physical devices. Currently Calico supports two contexts: the
Myro robotics library for the Scribbler robot with the IPRE Fluke
extension [2, 14, 17], and a 2D Graphics library with optional
support for physics simulations, including gravity.
A Calico library only needs to be written once, but appears as
if it were implemented for each of the supported languages. For
line = Graphics::Line.new(Graphics::Point.new(0,0),
Graphics::Point.new(100,100))
line.draw(win)
The Graphics library is written once in standard C#, following some basic guidelines, and then compiled on any platform to a
shared library. This shared library is then placed into a folder of
the Calico Project, which makes it available to all of the supported
languages. As can be seen from the above examples, the library
provides a native interface for each language. It is important to
note that there is no additional glue or wrapper code necessary to use a library. In addition, the library is not dependent upon
the language that is using it, nor the operating system. In this
manner, the compiled library can be used as-is with future languages or operating systems that have not yet been created. This
will greatly facilitate the maintainability of the entire project as
time goes on.
The Myro robot library implements a well-tested API developed by the Institute for Personal Robots in Education (IPRE) [7].
This API has been ported by others to many languages, including
C++, C, and Java. We are currently deploying Calico within a
robots first CS1 setting. The 2D Graphics library is designed to
support many different uses. For example, it can serve as a
replacement for Zelles Python Tkinter-based graphics library
[18]. Of course, since it is written as a generic Calico library, it is
available to all of the Calico languages, not just Python. We
would also like for it to eventually provide the functionality of
Processings 2D graphical library [15]. Combined with the drag-
To augment the Calico 2D Graphics library, we have also included in Calico a set of real world data. For example, we have
included the regions of each US state in longitude/latitude format.
Combining this with some supporting code for mapping longitude/latitude points to a window coordinate system allows students to easily create interesting visualizations. For example, one
can plot the path of an active hurricane, or visualize by state the
percentage of adult smokers (see Figure 3). The top image shows
the path of Hurricane Irene plotted using a Calico function to map
longitude and latitude to (x, y) window coordinates. The bottom
image shows a visualization of the adult smoking population of
various states. The darker the color of the state, the higher the
percentage of smokers in the state. States are represented by
polygons of longitude/latitude pairs that are drawn using Calicos
Polygon class. More generally, this library will make it easy for
students to learn to manipulate and experiment with big data
within many different contexts, using graphical visualizations as
the primary tool.
One of the main design goals of Calico is the separation of
the pedagogical context from the programming language. This has
the benefit of allowing one group of educators to focus their resources on developing interesting libraries and contexts, independently of other researchers working on language issues. Thus,
the hope is to create many reusable components (languages, libraries, and contexts) that can be easily integrated and maintained
within a single framework.
Calico contexts may also incorporate the use of special
hardware and other devices. Inexpensive sensors and effectors are
increasingly available for use in the classroom. Hardware like
Arduino microcontrollers [1], the Microsoft Kinect camera, and
the iRobot Create robot are relatively inexpensive and allow
students to write programs that interact with the real world. This
physical presence can make students programs seem more
relevant and engaging, as they are authentic problem domains.
Our goal is to make cutting edge hardware accessible to all levels
of the computing curriculum through Calicos Devices library.
For example, students using Calico in a creative computation class
will be able to access the depth images provided by the Kinect, or
to drive a Create mobile robot around using a simple, standard
API.
will make it easy for them to immediately try out the examples
being discussed in class. Likewise, students will be able to blast
their assignments to their teachers, or perhaps blast code to each
other. In addition, we have outlined plans to develop further support for interactive collaboration in Calico, so that two students
could work together, even if they are in different locations.
Finally, Calico is designed to incorporate the functionality of
Personal Response Systems (often referred to as clickers),
which can be used to provide interactivity in a classroom. Interactivity can be an effective way to enhance learning, even with
larger class sizes. At this stage, we plan on implementing only a
basic quick poll functionality. The instructor could initiate a
question on the fly, perhaps with a multiple-choice answer selection, in order to gauge students comprehension of a particular
topic. Students would each receive the quick poll via a pop-up
dialog in Calico, where they would select one of the choices.
Afterwards, the instructor could display a bar chart of the groups
responses, leaving individuals anonymous. The class could then
either discuss the topic further, or move on to the next topic,
depending on overall student understanding.
4. CONCLUSION
5. ACKNOWLEDGMENTS
An early version of this project was funded by NSF DUE grant
#0920539 (Blank and OHara). Initial funding for the Myro
project was provided for Blank and OHara by Microsoft
Research. We would also like to thank Deepak Kumar for his
support on this project. Finally, we would like to acknowledge the
six institutions currently testing Calico: Bard College, Boston
College, Bryn Mawr College, the Baldwin School, Macalester
College, and Rowan University.
6. REFERENCES
[1] Banzi, M. 2008. Getting Started with Arduino. OReilly
Media / Make. December 2008.
[2] Blank, D. 2006. Robots make computer science personal.
Communications of the ACM 49, 12, 25-27.
[3] Calico Project Home Page. http://calicoproject.org.
Retrieved 9/2/2011.
[6] Guzdial, M. 2003. A media computation course for nonmajors. In Proceedings of the 8th Annual Conference on
Innovation and Technology in Computer Science Education.
ITiCSE 03. ACM, New York, NY, 104-108.
[7] Institute for Personal Robots in Education.
http://roboteducation.org. Retrieved 9/2/2011.