I really believe in people being able to code. The extended internet is an empowering place for individuals in the 21st century, but if you can’t code, you’re mostly relegated to being a consumer.
I really believe in kids learning to code. My kids get some ok teaching in IT at school, but it seems to revolve around Microsoft Office in primary school (they’ll be ready to kick arse should we time travel back to 1996). More useful stuff at high school, but where’s the code?
My son Lochlainn really loves computer games, including flash games, and wants to make them. He’s just getting to an age (about to turn 10) where he can handle concepts of coding. Last year we really went hard with MIT’s Scratch, a *very* cool environment for kids to learn to code, but it has serious limitations, so any kid who really likes this stuff will hit the walls fairly quickly. Still, it’s an excellent starting point, I can’t recommend it highly enough.
But now it’s time to move to bigger and better things. He wants to make real games. He’d really like to make World of Warcraft, so a lot of my job is to lower expectations a bit (or else raise a billion dollars in seed capital, but that’s not been going so well). So I’ve been trying to work out, what’s the right stuff to teach him? What’s are the best first steps from being a 9 year old n00b, to being an at least partially self-educating code grommet?
Coders my age often bemoan the lack of code like we had it in the 80s. All the computers had basic interpreters, and that was a good simple environment to learn; you couldn’t do much, so you couldn’t get too confused. And so, the temptation is often to look for tools that are like what we had on, say, the Commodore 64.
I wonder if there’s a better way to turn kids off coding than this approach? You take a kid who plays WoW, console games, online flash games, and give him/her something that lets you go “10 print “Hello World”; 20 goto 10″, and they are going to think “well that sucks”. And fair enough too. We had low expectations because computers were totally crap when we were kids, really horrible. That’s not the case now. Kids now want animations, sound, multimedia, and there are environments entirely capable of giving that to them. Let’s start there.
Lochy’s started using flash to make some animations, and really took to it easily. We talked about making a game, and decided on a car racing game, top down view. I teach the approach of starting really simple, and improving in increments. The rough approach is going to be
- Create an animated car (wheels wobble? smoke clouds come out the exhaust? etc)
- Create a static animation of the car driving around (still no code)
- Add code so you can drive the car around a white screen with the arrow keys in a car-like way
- Create a track that fits entirely on the screen, make it so you can drive around on that
- Add some intelligence – maybe that you need to complete three laps, some method of measuring that you’ve gone the right way around the track, crash if you go off the side, stuff like that
- Add a second player who can use keys as well (W-A-S-D), now both can race around the track
- Add rules so this is actually a proper game (measure laps for both, have an end-of-game screen announcing the winner, some score counters on screen, etc)
- Now add computer controlled cars (maybe following an invisible line around the track? We’ll figure this out when we get there).
He’s already done 1 & 2.
I’ll keep writing about how this goes.
He doesn’t just want to make games though, he wants them in a slick website with sophisticated features; they should remember high scores and achievements, with the possibilities of social media integration. Kids now think in terms of the online environment. And of course he wants to have multiplayer functionality.
I’ve been using Google AppEngine for web applications. It’s free and quite spectacularly powerful, and relatively simple to work with. I code in python for AppEngine, and I think that’s a great language for kids to learn. It would be best to have a high level framework to add to this, and Django looks like the thing. I haven’t really used Django, but I want to try it, it looks strong and simple, and AppEngine has it available by default, so there are no tricks to getting it going.
The point here is that I think I’ll add this in a little while to what I’m teaching Lochy. AppEngine + Python + Django should prove to be a powerful web environment. You can write data driven web service like functionality in it, which you can talk to from Flash, so the Flash games can integrate with the backend. Sounds complex, but I think it’s actually pretty straightforward.
Flash + AppEngine + Python + Django. FAPD. A technology stack suitable for kids, I hope. I’ll write more on this.