sp5repl: A Read-Eval-Processing Loop with Scala

I teach two introductory computing classes at Bard: one using Python (using IPRE’s Calico and robots) and the other with Processing. Both programming environments could be better by borrowing ideas from the other. And by better, I mean a lower floor, making it easier for newcomers to programming; and a higher ceiling, making the tool useful after CS1. Rather than concentrating exclusively on one tool, I am continuing to attack the problem on both fronts.

This post is focused on making Processing better for introductory courses; Calico is next.

My first attempt is a simple tool called sp5repl, a small layer around Scala and Processing that allows you to write Processing sketches dynamically using an interactive read-eval-loop. The code entered into the Scala REPL is actually compiled, thus it runs at full speed; we get most of the flexibility of Jython and Clojure/Quil with the speed and error checking of Scala. A small example that generates the image below:

sp5repl>size(250, 250)
sp5repl>background(24)
sp5repl>smooth()
sp5repl>fill(196, 128, 64)
sp5repl>ellipse(width/2, height/2, 150, 150)
sp5repl>fill(64, 128, 196)
sp5repl>for (i <- width to 0 by -1) ellipse(random(i), i, i/20, i/20)

screen4
Continue reading sp5repl: A Read-Eval-Processing Loop with Scala

Doubling Down on Experimental Public Education

If we were creating Sesame Street from scratch in 2012 would it use Scratch? A Scratch-based Facebook? A Pre-school-MOOC? If we wanted to create a large publicly-funded 21st century education equalizer — what would that look like?


At Bard we like to experiment, particularly with education. Bard runs various public high school early colleges throughout the country and is involved in higher education throughout the world. Later this week, Bard’s Center for Curatorial Studies (the program that gets the CS acronym on campus, computer science is shortened to CMSC) is hosting a conference on experimental education. Maria Sachiko Cecire, who will write a follow-up to this post, will speak at this conference about Bard’s new Experimental Humanities concentration she directs, and if distilled to a single quote:

“…provides students with the historical context, theoretical background, and analytical and technical skills needed to engage productively with new forms of humanistic inquiry in our digital age”

The concentration emphasizes the need to think critically in many modes at once, e.g. text, film, and digital media. As my first blog post indicates, my participation stems from an interest in promoting digital literacy and reforming our “read-only” digital culture, as Larry Lessig might put it. Ultimately, we hope literacy in experimental media can push the boundary in terms of thinking and education.

Continue reading Doubling Down on Experimental Public Education

Learnable Processing Programming: Part One

Brett Victor recently posted an intriguing essay entitled Learnable Programming. I’ve been a fan of many of his essays (e.g., [1] and [2]). Victor is quite a pioneer of what we might refer to as design-based computing pedagogy as opposed to a programming or assessment driven pedagogy. And this essay surely lives up to his previous work; I think I could write fifty blog posts reacting to this single essay. T-49 …

Pedagogical Processing

I use Processing in my introductory computing class at Bard. This semester is my third iteration of the class. I chose Processing for a variety of reasons, some of which overlap:

  • Processing allows artists and designers to write real code with relatively little pain.
  • Processing balances developing powerful programmed artifacts with a relatively simple programming interface.
  • Processing has a welcoming, productive open-source community.
  • A ton of libraries and examples help students write relevant, meaningful sketches (e.g. with video, images, sounds, etc.)

Continue reading Learnable Processing Programming: Part One

On Computational Teaching

Why aren’t computer scientists the best teachers?

(Or, why our students aren’t robots.)

“Science is knowledge which we understand so well that we can teach it to a computer; and if we don’t fully understand something, it is an art to deal with it. Since the notion of an algorithm or a computer program provides us with an extremely useful test for the depth of our knowledge about any given subject, the process of going from an art to a science means that we learn how to automate something.”
—Computer Programming as an Art, Donald Knuth, CACM, December 1974.

Why aren’t computer scientists better teachers? Or rather, why aren’t computer scientists the best teachers? We are very good — pros, in fact — at explaining things in absolute detail to things that know absolutely nothing. If we can explain quicksort to a RISC machine, we should surely be able to teach binary-search to teenagers, right?

But of course we don’t teach our computers. And we don’t program our students. Or do we?

Continue reading On Computational Teaching

The Algorithm Made Me Do it!

Last Thursday, one of our Live Arts Bard artists-in-residence, Annie Dorsen, gave us a behind-the-scenes view of her latest production: False Peach. The performance explores the notion of consciousness, agency, and language through an algorithmic production of Hamlet. Although still in its infancy, the play will use automated dialogue and lighting to recreate the famous play in an experimental fashion. I had the chance to attend her presentation of her piece Hello, Hi There at AAAI-2012 in Toronto this past summer. Hello, Hi There will be performed at Bard in November.

The moral agency of robots, or software-bots, has been a hot topic in both philosophy and robotics lately. And from my perspective, the most interesting part of Annie’s work, is this notion of agency or control. Who is responsible for the software’s actions? — whether it be drones or drama. In some ways, the creators of the play relinquish control of the production to the algorithms. They hit start at the beginning of the performance, and magic happens. Every night is a different, unpredictable performance. Random number generators, equations, and conditionals guide and mis-guide the narrative. But in an important sense, this type of production is one of the most controlled plays ever. Everything is predetermined, and nothing is left to human improvisation. There is no pesky spotlight operator to miss her cue or actors to make a slightly late entrance or improvise the delivery of a line. And not only is it deterministic and in some ways eternal, but that stems from a human encoding this knowledge in a computer program. It isn’t eternal because it’s a machine, it’s eternal because the play is formally encoded.

I asked Annie a question relating to this notion of control and she had a great response about this work truly investigating the notion of collaboration. Collaboration between humans, and collaboration with machines. By formalizing the dramatic decisions in code, a very systematic exploration of collaboration and decision-making is possible. A very exciting approach to exploring agency, and I look forward to the final production next year.