I’ve been thinking recently about how I can help introduce more young people to the joys of coding. So far I’ve scored a minor success teaching a group of nine year olds MIT’s Scratch, but I’d like to try something a bit more scalable, aimed at older learners.

One concept I’ve been mulling over is an easily accessible, online ‘coding game’. I have some basic thoughts, which I’ll outline below, but want to make it a collaborative, open source project. I’m putting the idea out there for comment / feedback etc and if you want to get involved in any way at all then get in touch.

So here’s my initial thinking…

  • You play the game by writing code to guide a character/robot/thing around the screen to solve a series of increasingly complex challenges.
  • When you complete the challenge, you get to see (and play with) the code that other people who also solved the challenge used.
  • There would be a ‘compete’ mode where you could play in real time, against another coder. At the end of the challenge we ‘swap’ the code, so both people can learn from the way the other has constructed their code.

My theory is that by setting out an ‘objective’ (ie completing the challenge / beating your opponent) to the coding and then sharing the code it will encourage people to learn from each other (I’d be v. interested on any educationalists take on this approach – how would we improve it?). Of course, its not a completely original principle, but I haven’t seen anything web based that uses this combination of competition and code sharing as a learning tool before.

I’ve expanded on some of my initial thoughts in this video.

I’m keen to make this happen, but I can’t make it happen on my own. What I can do is co-ordinate stuff; contribute ideas; do some of the code etc and generally move things forward. If you can help in any way then please leave a comment on the post and I’ll be in touch.

Some links for things mentioned in the video…

  • Robocode is a good example of a code based game, although my view is its a bit complex for the age group we’re targetting
  • Raphael is a javscript vector graphics library – i’ve used it for a few projects and it’s good on the cross-browser front
  • Skulpt is an in-browser implementation of Python. I think there are lots of things about python that make it a good language for kids to code in, but of course maybe theres a better choice
  • Node seems like the obvious choice to provide any real-time element for the competitive challenges

6 comments until now

  1. It is a good concept and taking the principle of code vs code makes a lot of sense.
    It would be good if the entire client was also open to coders too as they effectively level up their skills.
    If you are aiming for live real time competition then addressing the problems of servers and shuffling data around in the infrastructure will arise.
    Unity3d is an obvious platform to be able to produce a rich gaming experience and then coupled with Photon or Smartfox servers to allow player to player activity.
    You then have two options for development.You can have the end client/game that accepts the restricted code base and rules for the robot puzzles just as in any other game played only in the browser, but you then also have the ability to distribute code components and prefabs to all others to create newer clients and run those form their own development environment. This does encourage hacking and activity of course.
    Another consideration might be to use existing virtual world tech such as open simulator opensim.org and alike. Those environments let you have a persistent world that can be populated with objects that can have code applied into them to make them move around and act in the world. There is a president for that in what the Rational arm of IBM did when I worked on virtual worlds like Second Life back in 2006-2009. Coding bots that could be configured were used in a maze environment. You get the interaction at an immersive avatar level and also get to explore programming as a concept with that sort of construct.

  2. Lisa Feay @ 2012-02-02 15:43

    A possible resource for you; a program started here that was designed to foster coding for the youngin’s http://coderdojo.com/

  3. love the idea, especially the “live coding against each other” part.

    to mind came card games like magic the gathering. maybe the app is just delivering the console and a map, without a central database. at the beginning of the game, a player uploads a file with his/her functions – the “deck of cards”. like kids meet at comic stores to play.

    maybe there is a little app on github, with which people can deploy their own local league to heroku. it’s then up to them then to build communities, circles of trust, watch out for cheaters and so forth.

    sadly i am not much of a gamer and a coder-noob. but i do ux and conceptual design, and will be a dad soon myself. so if you want, i could chip in with a skype session for now…

  4. Hi Jim,

    i chimed in on twitter (I’m @halfbyte). Fabian and I know each other, just so that you know as well :)

    Finding ways to teach kids programming is definitely also something that crosses my mind on a regular basis, because I’m probably part of the last generation that actually had computers which screamed “program me” with a BASIC prompt and on the other hand I am baffled by young people who studied computer science and the first time they actually wrote a line of code was in their first year in college. Wait, what? I was maybe 12 when I wrote my first line of code on the pocket calculator of my dad. And I am inclined to say that this actually makes a difference.

    I love your idea. I kinda hinted on that on twitter, but let me say it again in a more lengthy way: I could totally see a language like ruby or python (have you seen http://hackety.com/ ?), but actually using a more abstract language like LOGO has some benefits, I guess. I learned using LOGO at school and in retrospect I think that having a LISP like language made it easier for me to grasp stuff like loops, conditionals, recursions etc. You might say that LOGO, instead of Python or Javascript (as in Code Hero) is a bit like learning Latin (a dead language), but the basic building blocks are there. (Also, one could argue that LOGO, being designed as a functional language, might befit younger coder generations better for the kind of paradigm shift that so many people are predicting for the hyper-multi-core architectures of the future).

    But in the end, the choice of language might not be as important as the UI and the competitive element. Heck, in the end it might even be a nice idea to actually try to make it language agnostic and A/B test the learning capabilities of various languages. :)

    I’d love to get in touch with you regarding your idea and obviously I should also talk to fabian again (we need to finally drink a beer together again anyway) as well.

    Thanks to fabian for pointing me into your general direction.

  5. Hi Jim,

    Just catching up on your posts — I’m about to start teaching a lunchtime Scratch programming club to nine year olds in my son’s primary school and I might borrow your Moon Monsters game at some point if that’s ok!

    Your robot challenge idea reminded me of a few games a while ago that had a similar premise but were more based on electronics than programming. I think it started with a game called Robot Odyssey on the Apple ][ — a guy called Thomas Foote has documented it and built a (marginally) more up-to-date version called DroidQuest. See http://www.DroidQuest.com for details.

    The great thing about Robot Odyssey and DroidQuest is that the instructions for developing your own robots are actually built into the exploration of the environment — each room tells you a little bit more about building robots and has an example for you to experiment with.

    There’s a whole electronics course built into the DroidQuest code and it should be possible to do a similar thing for programming too (though I certainly don’t underestimate the effort involved…).

    I’m not sure where the social side would come in with this way of doing things, but it would work well for a tutorial or training ground.

    Thomas Foote has also made the source code of his DroidQuest game available (http://mysite.verizon.net/thomasfoote/DQ/id78.htm) though it might be easier to take the ideas and re-implement them.

    Feel free to contact me on twitter or email, and I may be blogging my experiences of teaching Scratch to nine year olds on http://blog.cohen-rose.org (I can only hope that they will be as successful as yours :-)

    Best wishes,


  6. I’ve been meaning to reply to this for a few days. I’ve got ideas, but trouble finding the words.

    I love the basic idea you’ve sketched out. The trickiest part I see will actually be in the ‘level’ design (assuming levels progressing in the vein of a game was the route taken). When designing each level, we should have a clear goal in mind of the concepts we are trying to teach. As a very basic example, levels could progress as follows:
    – Get turtle from A to B (teaching basic instructions)
    – Get the turtle to move based on some condition (control flow)
    – Get the turtle to do a dance around the screen (using functions, with the dance being a supplied function)
    – Make up your own dance for the turtle (write functions)
    – and so on…

    Balancing the learning curve of the levels with creating an engaging experience, all whilst trying to cover the underlying education goals will be the real challenge I see. Getting this nailed should be the big priority.

    Assuming the audience is primary school aged, then the big goal must ultimately be to get the children simply thinking in a more logical way – getting their synapses firing in a way that when they do start coming across more real programs (perhaps when older), that they’ll be able to reason about things better. I would make a point of avoiding technical terminology. E.g. recursion could be presented implicitly in some of the levels, but it needn’t be called anything special like recursion. Just presenting the idea to young minds should have value.

    It’s no coincidence that I mentioned turtle above – I’d also like to echo what Jan said about Logo. My first programming experience was moving the turtle around the screen on our ancient BBC Micros back in primary school. I’d say it was invaluable in getting me to to think about how computer code works, even if I wasn’t really sure I understood anything at the time. I think using a language such as Python (which I don’t mean to pick on) sets us on a slippery path down to actually teaching Python. What we actually want to teach is the fundamentals and the principles of programming. Its for precisely this reason that my first class at Uni was taught in Scheme – whilst it didn’t have any immediate practical use in its own right [1], it was a superb pedagogical tool in teaching the fundamentals (the class was called Principles of Programming after all, not How to Program in Scheme). I think using a language that is quite reserved in its feature set is the way to go.

    A quick search throws up a Logo interpreter for Javascript [2]. Maybe we could reach out to the author?

    I’ve said a lot of We and Us above. In short, I’d love to help out. I’ll try to grab you tomorrow (well, tonight now) at Reading Geek Night.


    [1] I’m ignoring the resurgence of Lisp languages, with Clojure leading the charge. The fact that Logo is a Lisp derivative is just a nice coincidence :)
    [2] http://calormen.com/Logo/

Add your comment now