Tuesday 6 November 2007 — This is 17 years old. Be careful.
Philip Greenspun asks “What’s the Best Computer Language for a 13-year-old Beginner?” and gets an awful lot of responses. Many of them seem to totally miss the mark about how to introduce kids to programming.
In my experience, you have to keep a number of things in mind besides programming languages.
First you have to find out what fascinates the kid in question. Do they want to make a video game? Do they think expressing themselves in a web page is cool? Do they want to pull data from the web and manipulate it somehow? What sort of application would be interesting to them? Some kids are fascinated by programming itself, but most are only using it as a means to an end, and you need to know what that end is to keep their attention.
Next, there are many things that you and I don’t think of as programming that are still programming in the kid’s mind. Creating an web page in HTML is programming. Selecting the correct options in a constrained game editor like RPG Maker XP counts as programming.
To a kid who’s never told a computer what to do before, any kind of direction that the computer will follow counts as programming. It may not have loops, it may not involve typing, but they still have to:
- decide what they want the computer to do,
- understand the tools at their disposal,
- create the instructions,
- try out what they did,
- and figure out what’s wrong when it doesn’t come out right.
That right there, that’s programming.
The last thing to understand: how much help will you be providing? One way to get kids going is to do most of the work yourself, but then give them a very simple control to play with. I wrote a simple video game once, and then showed Max where the initial number of aliens was set. He could change the value from 10 to 50, and see a dramatic difference in the game play. It was eye-opening for him even though he was too young to be able to make substantive changes.
If you are going to help a lot, then you either have to choose a language you already know, or are willing to learn yourself. If you aren’t going to help a lot, then you have to choose a language that won’t need a lot of help. This sounds obvious, but your time commitment is often the toughest variable to get right, so think carefully about it.
All that said, I think there are some interesting unconventional choices for where to start kids with programming:
- Flash: the big advantage here is that you can start by simply making key-frame animations, and then graduate up to Actionscript in small doses. Also, kids have probably already been exposed to tons of Flash content, and so have good cultural understanding of the types of thing they can build with it. Downside: expense, though I had good success with buying a copy a few versions old on eBay, and Academic Superstore will sell you an educational license.
- Scratch is a tile-based visual programming environment. The results can be a little crude by Flash standards, but it’s a very nicely made environment. Actions are expressed by clicking tiles together, so there’s no syntax errors to stumble over. Some of the example projects are quite impressive. One nice detail: the layout of the tile code almost resembles what a textual programming language would look like, so it’s a good stepping stone to more mainstream environments. BTW: MIT also has StarLogo TNG which also uses the tile metaphor for building programs, and uses a more ambitious 3D environment, but seems not quite finished.
- RPG Maker XP is a game editor for making tile-based games like the original Legend of Zelda (I think). The graphics are all created from a large set of tiles, so it’s easy to make environments that look reasonable, and all of the “coding” is done my making choices in dialog boxes. Enormously complicated dialog boxes, but at least there’s no syntax to learn. Max downloaded and figured it out himself when he was 12 or so, and now he’s taught Ben (now 9) how to use it, so it’s approachable, even though I don’t understand it at all. There’s no real path up from there, though, so this is only good if the child in question wants to make RPG games.
- HTML. Don’t worry that this isn’t a programming language, and don’t worry about all the CSS form-vs-content stuff. Your kid will probably be thrilled by <font size=7 color=red> and will have his first taste of where the red pill can take you.
In the conventional languages arena, there are good attempts to bridge the gap from kids to code: Hackety Hack is a tutorial and programming environment for Ruby, and RUR-PLE is a robot simulation using Python.
Whichever tool you choose, remember: they’re kids. Don’t make the mistake of treating them like short adults. They aren’t starting a career, or building a resume. It doesn’t need to be bullet-proof, it doesn’t need the latest theoretical underpinnings. Give them the answers when they are stuck.
Just make it fun.
Comments
Even if game is not as professional looking like commercial games, kids appreciate that you can go in and change whatever aspect you want.
* decide what they want the computer to do,
* understand the tools at their disposal,
* create the instructions,
* try out what they did,
* and figure out what's wrong when it doesn't come out right.
is right on. Helping them learn to think algorithmically is the best thing we can do, imho, whether or not they ever become "programmers".
Thanks for the great suggestions.
I disagree with the comment on treating them as short adults. I have always been impressed with kids ability (even younger than 13) to pick up technical knowledge, and personally feel the average kid with no programming experience learns a lot better than the average adult. I say get them started right away with C# or Java (general programming) or even C (good if they have access to linux) if they have any interest.
I learned by being asked to solve simple problems (given 2 angles and a side of a triangle compute the other angle and sides). I wasn't 13, I was 16, but still a good way to learn.
I also say stay away from heavy lectures on commenting code, readability, modularity, etc. I question what good it does college freshman (it does not improve their code), it only makes people not enjoy coding.
Games Factory was my first programming experience as a 13-year old. Very simple and easy to learn yet quite powerful. Free demo versions are available at the website.
Brad: when I said "don't treat them like short adults," I didn't mean that they couldn't learn a lot, just that kids need different things than a college student learning a language, or a junior engineer learning a third language.
RUR-PLE is a nice environment. I also like Alice - http://www.alice.org/
Try Alice or Scratch or Processing or GameMaker.
I mean, good if you are actually in the position now to bring some knowledge to your kids, but at least back then most of us taught our parents to use the computer.
So yes, some kids are fine learning the way adults do. As a matter of fact, it's the way I learned. But many kids are not. Know your customer!
My dad bought me a box of Turbo C when I was 11 or 12 after I had "hacked" a bit with MS Word (umm..). What I got was 2 books and an IDE and I loved it. It gives you the opportunity to try out things and kids are very well able to use general purpose tools to have fun. Likewise it's always more fun for a kid to play with a real hammer than with a toy one :)
So, please don't treat your kids like kids and give them a real hammer - it won't hurt.
All of these development environments mentioned are a huge leap forward over Basic - but how many computers come with them? How many parents bother installing them? And how many of them are more fun than just playing games?
For older children, the best route into programming seems undoubtedly to be the mod kits and level design kits that many games ship with nowdays - all the fun of the latest games, but you're making something yourself. I'd like to see more of these for younger children - simple games with simple mod kits and level builders.
I learned structured procedural oriented programming with it even though it was a paper/pencil exercise. I did eventually write a simulator based on Karel using Turbo Pascal on an old DEC Rainbow CP/M 86 in the early 80's as a project for school. Another more recent one is Squeak which is based on small talk. I think these Robot languages are the perfect answer to this question.
Add a comment: