Saturday, December 1, 2012

Hackathons in the Classroom

I teach a graduate-level GPU Programming and Architecture course at the University of Pennsylvania. I do lots of atypical things like open source projects using github (there is no "homework" - who wants to do homework?) and I've even let the students make their own final - of course, they didn't know they were doing it at the time. This year I got rid of the final altogether to allow us to focus more on building portfilios of projects like, for example, the work of Zakiuddin Shehzan Mohammed.

Inspired by Facebook and PennApps, and based on feedback from last semester, I decided to bring a hackathon into the classroom. The goal being to build a culture of excitement and intensity, and to code for the fun of it. No grades, just bragging rights and prizes: a copy of OpenGL Insights and a few Cesium t-shirts.

Tiju Thomas presents his hack

I canceled class and replaced it with a six-hour hackathon, 6pm-12am, in the graphics lab using the GLSL Sandbox, an online editor for writing GLSL fragment shaders. The theme was two triangles (or even one) ought to be enough for anybody. The GLSL Sandbox renders a full-screen quad providing one fragment per pixel for students to ray trace, ray march, or do anything else they liked. They were allowed to fork any existing example in the gallery as long as they demoed the original along with their work.

I even encouraged students to fork each other's work as a fun way to compete, e.g., a student might focus on soft shadows, procedural textures, and other shading techniques, and then fork another student's work doing CSG to create something really awesome. This arms race didn't pan out in practice, but with more preparation - perhaps a project on ray marching leading up to the hacakthon - it could be really interesting.

Ashima Gupta and Yue Hue present their hack

Once the hackathon got rolling, there was a sense of focus and intensity. By the end, all students got something working, and many surprised themselves. People outside of my course even joined in, like Nop Jiarathanakul's procedural smoke and Gabriel Leung's Conway's Game of Life

We stayed until about 2am doing demos and reflecting on the experience. It was very cool to see students motivated and working hard for the sake of the project; there were no grades involved. A student could have walked out or not even showed up with nothing to lose, but no one did.

Yuanhui Chen presents her hack

Moving forward, we may compete with a class at another university and do a longer event open to all our graphics students. I want to thank our TA, Karl Li, for helping with the event, Nop Jiarathanakul for demoing his work at the kick-off, and Aline Normoyle for letting us use the lab.

Check out the results:


  1. Sounds like an awesome class. Hope it catches on elsewhere! Some of the best experiences from my college career has been at hack-a-thons, even those where things epicly fell apart.

  2. I wished my university would do practical coding activities like this too ...


Note: Only a member of this blog may post a comment.