Teaching kids to code

Posted on Thu 23 September 2004
Matthew is looking for good ways to have his kid starting to code. Just like him, I remember the time spent typing Basic programs that just displayed some very basic graphics, or driving the user using a text menu. These programs where rather simple to write, and were adapted to the low computing power of my Apple II.

But today's children aren't satisfied with this, which is way too far from the super-realistic 3D games they have just a mouse click away. So you must find something else.

My eldest kid started more than a year ago with Dark Basic, a special Basic that provides 2D sprites and 3D drawings with a lot of examples. Very cool to get started, as with a few dozen lines you have some nice animated graphics. But the language itself is very limited as it has no data structures and functions look like an advanced feature (yeah, goto and gosub still exist there!).

There's also Blitz Basic which we didn't knew about when we bought Dark Basic: the language seems to be better thought out, offers data structures (without methods -- it's not OOP), and the IDE looks more like a real one although it's still simple.

But my kid always has big projects and wanted to write complicated stuff, and I couldn't refrain thinking that using a real OO language could save him a lot of typing, along with introducing him to "real" programming. So I showed him Java, using BlueJ, a nice IDE designed by teachers for OOP courses. It provides a class diagram that automatically syncs with the code, which shows a concrete view of it. That is essential considering that OOP leads to lots of small files.

Now getting into Java is not a piece of cake, and in order for my kid to get started, I rewrote in Java one of his Basic games. That required to setup a simple sprite handling library that relieves him from the complicated AWT stuff.

Despite the increased complexity, the benefits of OOP quickly became apparent to him, and the clean separation of concerns allowed him to concentrate on the game logic, leading to quite interesting things.

I now have to introduce him to Cocoon (well, actually he often ask me for this!).

Matthew, keep us posted of your findings!



Meeting the Java Studio Creator team

Cocoon GetTogether 2004