Friday, December 12, 2008


For my Open Source Technologies class, I was showing off scriptlets in Perl, Python, and Ruby. My last example involved connection to a MySQL database. In the name of fun, I made a very basic Pokédex. The program was very simple: just plug in the Pokédex number and return the name of the Pokémon; and for authenticity, I used the complete list. This is how the conversation in class went:

Me: " you can see the code is straightforward and easy to understand. Here you create a database object, and in the next line you invoke its query method. Then it returns the result set. Plugging in 20 into the Pokédex number gives us...Raticate."

Class: (ho-hum)

Me: "Alright, let's see how good you are with Pokémon. What's the Pokédex number for...Pikachu?"

Class: "25!"

Me: "Eh? Are you sure?"

I type the number in. And out comes...Pikachu.

Me: "Well, I'll be.... Care to try another one?"

Class: "Yes! 150!"

Me: "150? What's that?"

Class: "Mewtwo!"

And so we go on for a few more numbers and all the name associations are spot-on. Whowouldathunk?

Darned kids these days.... I think I might get further if I drew up program specs for a Pokémon game. Now if I could only get the actual character database.

No comments:

Post a Comment