TITLE: SIGCSE Day 1: Media Computation BoF AUTHOR: Eugene Wallingford DATE: March 08, 2007 8:03 PM DESC: ----- BODY: A BoF is a "birds of a feather" session. At many conferences, BoFs are a way for people with similar interests to get together during down time in the conference to share ideas, promote an idea, or gather information as part of a bigger project. Tonight I attended a BoF on the media computation approach I used in CS I last semester. The developers of this approach, Mark Guzdial and Barbara Ericson, organized the session, called "A Media Computation Art Gallery and Discussion", to showcase work done by students in the many college and high school courses that use their approach. You can access the movies, sounds, and video shown at this on-line gallery. Keller McBride's color spray artwork The picture to the right was an entry I submitted, an image generated by a program written by my CS I student Keller McBride. This picture demonstrates the sort of creativity that our students have, just waiting to get out when given a platform. I don't know how novel the assignment itself was, but here's the idea. Throughout the course, students do almost all of their work using a set of classes designed for them, which hide many of the details of Java image and sound. In one lab exercise, students played with standard Java graphics programming using java.awt.Graphics objects. That API gives programmers some power, but it has always seemed more complicated than is truly necessary. My 8-year-old daughter ought to be able to draw pictures, too! So, while we were studying files and text processing, I decided to try an assignment that blended files, text, and images. I asked my students to write an interpreter for a simple straight-line language with commands like this:
     line 10 20 300 400
     circle 100 200 50
The former draws a line from (10, 20) to (300, 400), and the latter a circle whose center point is (100, 200) and whose radius is 50. This is the sort of assignment that lies right in my sweet spot for encouraging students to think about programming languages and the programs that process them. Even a CS I student can begin to appreciate this central theme of computing! Students were obligated to implement the line and circle commands, and then to create and implement a command of their own choosing. I expected squares and ovals, which I received, and text, which I did not. Keller implemented something I never expected: a colorSpray command that takes a density argument and then produces four sprays, one from each corner. I describe the effect as shaking a paint brush full of color and watching the color disperse in an arc from the brush, becoming less dense as the paint moves away from the shaker. This was a CS1 course, so I wasn't expecting anything too fancy. Keller even discounted the complexity of his code in a program comment:
* My Color Spray method can only be modified by how many arcs it creates, not really fancy, but I did write it from scratch, and I think it's cool.
I do, too. The code uses nested loops, one determinate and one indeterminate, and does some neat arithmetic to generate the spray effect. This is real programming, in the sense that it requires discovering equations to build a model of something the programmer understands at a particular level. It required experimentation and thought. If all my students could get so excited by an assignment or two each semester, our CS program would be a much better place. At the BoF, one attendee asked how he should respond to colleagues at his university who ask "Why teach this? Why not just teach Photoshop?" Mark's answer was right on mark for one audience. Great artists understand their tools and their media at a deep level. This approach helps future Photoshop users really understand the tool they will be using. And, as another attendee pointed out, many artists bump up against the edges of Photoshop and want to learn a little programming precisely so they can create filters and effects that Adobe didn't ship in their software. The answer to this question for a CS or technical audience ought to be obvious -- students can encounter so many of the great ideas of computing in this approach; it motivates many students so much more than "convert Celsius to Fahrenheit"; and it is relevant to students' everyday experiences with media, computation, and data. The CS education community owes Mark and Barb a hand for their work developing this wonderful idea through to complete, flexible, and usable instructional materials -- in two different languages, no less! I'm looking forward to their next step, a data structures course that builds on top of the CS 1 approach. We may have a chance to try it out in Fall 2008, if our faculty approve a third offering of media computation CS I next spring. -----