jhkim ([info]jhkim) wrote,
@ 2008-02-19 11:35:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Pokémon Programming!

I did a little Perl programming project over the weekend that I'm rather proud of. Thanks to Danny and Liz for help and feedback.

I had been trying to think of some way to help my son get into programming. I personally am rather fond of Perl, and in some ways it is a good language to get started in. There are a lot of things that make syntax easier. For example, the default accepts bare words as strings, so you can say $a = hello rather than requiring quotes. It has many simple operations like its loops for (1..10) or sorting.

The really crucial problem with kids programming, though, is what they are supposed to do with it. Most starting programming tasks have boring applications. I noticed that my son has been obsessively going through the lists of Pokémon information -- and that it taught him how to use a search form, for example. That's data!! So over the weekend I set up two Perl modules and a CGI script for some simple Pokémon programming. The form takes standard Perl code, with a few imported functions for Pokémon data. Here's the result:

Milo's Pokémon Program Tester

For grown-up programmers, I have the underlying code online for perusal. There are many things that I would do differently if this were a module for grown-ups. Keeping that in mind, though, I'd be glad to hear various people's comments.

Notes for grown-up programmers

I have lots of ideas for extensions -- especially making it handle simple mistakes more nicely and give helpful messages. More concretely: inserting semicolons at the ends of lines if they aren't there, and re-phrasing some of the error messages returned.



(Post a new comment)


[info]druidsquirrel
2008-02-20 12:30 am UTC (link)
The second link ("Notes for grown-up programmers") gives me a 404.

(Reply to this) (Thread)


[info]jhkim
2008-02-20 01:43 am UTC (link)
Oops. I'm a better Perl programmer than blogger. The link is fixed now.

(Reply to this) (Parent)


Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…