[plt-scheme] Scheme projects in my undergrad CS course

From: Fred G. Martin (fredm at cs.uml.edu)
Date: Thu Dec 11 21:39:11 EST 2008

Dear PLT-Schemers,
You may have noticed a number of emails from my students at UMass Lowell.  I
had assigned a final project in our required "Organization of Programming
Languages" course which is based on the SICP text.  This is the first time
that the course included a significant, independent project component, and I
did encourage them to ask you for assistance.

I am happy to report that the projects were wildly successful.  Students
presented today, and some the highlights were:

* A stock visualization application in which users enter a stock symbol and
date range at a web page.  This is handed off to a Scheme servlet, which
queries a Yahoo! financial service.  Then Scheme generates an XML file
containing the data, and this is transparently given back to the same web
page and displayed as a live graph using Adobe Flex (

* A Music Discovery web app with a similar architecture.  The user enters
artist or song search terms into a web form.  This is handed off to a Scheme
servlet, which searches music service RSS feeds and aggregates the resulting
YouTube music videos into a web page presented to the user. The kicker is
that the web page includes JavaScript code so that when one video finishes
playing, the next one automatically starts, and you can have hours of
continuous music from one query (

* Scheme integrated into a C++ game engine, in which the front-end GUI is
implemented in C++, but the game-character "AI" consists of Scheme
procedures.  In the student's live demo, changing a line of code in a
resource file that the game auto-loads caused game characters to run
different AI and behave differently (

* A Scheme-based serial line API to the iRobot "Create" robot platform.  All
of the Create's motor and sensor APIs were exposed as simple Scheme
procedures.  (

* A set of Scheme procedures for converting image-bitmaps into control
commands for a 3D desktop engraver.  After engraving the PLT-Scheme lambda
logo, the final demo was an etching of the Last Supper in relief.  The
student who developed this also used higher-order procedures to generate
depth-maps on the fly, as you might pass a lambda function to the Henderson
painters to color a pixel based on the X,Y coordinate where it is to be
drawn. (

Overall, I was amazed not only with the creativity of the projects
themselves, but the extend to which students integrated key ideas from
functional programming into their project implementations.  Many students
used map and filter process data, and higher-order procedures across their

In a conversation with one student afterward, he noted that he had heard
people talk about elegant code, but now he understood what that meant.  This
student had written the Create robot API, and employed a clever way of
dealing with two-dozen-odd sensor packets that might come back from the
robot.  He created a hash map that keyed sensor type to a lambda function
for processing the sensor data packet. When he got the raw packet back from
the robot, he grabbed the lambda function, applied it to the packet, and
voila, the actual sensor reading was produced.  It was elegant.

The student also commented, "Now I want to go back over all the code I have
written in other languages over the past year and improve it."

This remarkable because this was far from the only student who had such an
experience.  Students really took the task seriously of using the functional
approaches in their projects, and they succeeded, many of them brilliantly.

Thanks for your help over the semester and in the last couple of days with
my students.  I'll definitely be doing this again in the spring!

Fred Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20081211/63f08525/attachment.html>

Posted on the users mailing list.