Thursday, May 17, 2012

Gamifying Programming?

I have a friend who is a teaching assistant in a local college. She teaches introductory programming courses, mostly to eager and not-so-eager 18 year olds. She's been working on engaging her students more, worried about the dropout rates from the Computer Science program.

So we were spitballing about the problem. And a lightbulb came on:
Let's gamify programming!

"Gamification" is - at least in the circles I move in - the hot trend of 2010-2011. Anything and everything is gamified, it seems. Shopping, fitness, training, surveys: you name it, it's probably been gamed. Gamification at its heart is simply applying the techniques of games to other systems. It usually means adding scoring or points, progress bars, leader boards or other challenges.

So let's gamify programming? Woo hoo! How would that work?

We were throwing out ideas like this:

  • Points for shorter methods (rather than thousand line methods of doom)
  • Leader boards for writing programs that accomplish their tasks faster
  • Teaching test driven development (red-green-refactor is totally a game)
It's all nice, but really, for me, programming was already kind of a game. It's just a different kind of game. Anyone remember Black & White?
Black & White was a strategy game that came out in 2001. It was a hugely ambitious game, in which you controlled villagers and a creature, and you had the power to make the creature good or evil (cue maniacal laughter here). Writing software is so much like playing that game, even without gamification elements.  Both things are immersive: I look up and discover that three hours have passed in the blink of an eye, and I have either a creature, or some new feature. It's frustrating: the game was hugely buggy, and writing code can sometimes mean intense effort to come up with.... 2 lines of code (woo too!). Both the game and the programming gives me a god-like feeling: in both the game and the code YOU made that happen (more maniacal laughter). 

I can't really get excited about gamifying software development because to me it's already fun in many of the same ways games are. Maybe that's just me.

But would you gamify programming? If so, how would you do it?


  1. I recently discovered Codecademy and am addicted.

  2. Project Euler does this to some extent.