Category Archives: videogames

How to Teach Programming to Kids, Part 2

It’s been a while since I wrote my first article on how to teach programming to kids. Since then, I’ve been able to try a lot of new stuff, some of which has worked, some of which hasn’t. I will share my experiences with you so that you can make an informed choice with your own children, whether you’re a teacher or a parent.

During the first term, my students were introduced to programming through small steps: first, they programmed each other on paper, playing a robot; then they played light-bot, an online game which perfectly illustrates how programming works. Then I moved them to robomind, an evolution of the old logo turtle which, in its latest version, can even be used to program lego mindstorms. Finally, we used MIT Scratch for game programming, which proved a resounding success: most students managed to complete a game in three or four lessons.

My challenge, then, was to introduce them to real programming: not a watered-down version for kids, but the real thing. In order to do this, I first had to give them a reason to learn. The way I did this was by teaching them cryptography.

English single letter frequencies. Created fro...

English single letter frequencies. Created from data from en:letter frequencies. (Photo credit: Wikipedia)

Cryptography is of course very complicated, but some basic concepts can be taught to grade 5 and 6 children. Ciphers such as the Caesar cipher, which consists of moving each letter a certain amount through the alphabet, are easily grasped. The way I taught this was by suggesting increasingly difficult puzzles: I’d start the class by displaying a message on the board and, without further help, I’d ask them to decipher it. To my surprise, they did it without help a couple of times. When they didn’t get it right, I would give them clues one by one: for example, I’d give them a list of the most frequent letters in the English language; the most frequent digraphs, and so on. Students were in groups and it became a competition, without much encouragement from me. The competition provided the motivation and the codes were almost always eventually cracked.

I also used the NSA webpage for kids, which has a lot of puzzles and even allows you to learn Morse code. The children were really excited about it. At the end of each lesson, I’d let the children write their own secret messages using the different techniques we learned during the class; then I’d put teams against each other, trying to crack the rival’s message.

I introduced the topic of programming by telling that computers made it really easy to cipher and decipher any message with very little work. That instantly caught their interest and they were soon asking me when we would start. After a while, I began to teach them Python.

English: example of Python Language

English: example of Python Language (Photo credit: Wikipedia)

Using the Python IDLE editor it was easy to get them understand basic concepts such as variables or conditionals. First we saw them in the console, where the result of each command is displayed instantly; then we started writing a full-fledged program in the editor. Arrays took a bit longer and for loops were a bit too much for some, though most got it without problems. The way I taught this concepts was by making a really simple quiz game, which is made with a raw_input and acouple of if…then statements. I introduced for loops to simplify the code, putting all questions inside an array and then looping through them.

After this, they were ready to start cracking codes: all you need is an array with the letters of the alphabet and an algorithm that loops through a message and replaces each letter by a different one. Then you can make a function that deciphers by taking the same initial function and giving it the opposite input. Finally, you can make a function that returns every possible message from a set of letters, so that students can just look and find the right one. There are of course lots of variants.

Microsoft Small Basic

Microsoft Small Basic (Photo credit: Wikipedia)

Looking back on this, I think using Python was a mistake. Python is quite powerful and it does qualify as a full-

fledged programming language, but creating things like good-looking graphics was quite beyond the ability of my students, since it requires the sometimes not-so-intuitive Tkinter library. One of the parents recently told me about Small Basic and I am under the impression it is a much better choice for children: it allows you to build amazing applications with very little code and displaying complex graphics on the screen is extremely easy. Small Basic also comes with a tutorial on how to teach it, which goes from making a simple game to playing with fractal shapes.

Summarizing, if you are a parent or educator, I recommend you to take a look at Small Basic, which seems to be the perfect programming language for children to get started. You can use the same approach of using cryptography as bait (and also because it’s interesting for its own stake) or you can start directly with the Small Basic program, which also seems engaging and fun.

Either way, the fact is right now there are so many great tools for teaching programming to children that it’s hard to choose from them. Using any of those is sure to produce great results and lead your students towards a future where they will be fascinated with computers instead of afraid of them.

Enhanced by Zemanta

Are Videogames Art?

This may come as a surprise to you, but I’ve always been a huge fan of videogames. The first game I played when I was a kid was “The legend of Monkey Island” and I instantly fell in love with the story, the humor and the puzzles. The script was absolutely delirious and even the ending left you wondering who the hell those people were who came up with a 2-disk game that asked you for disk 22 just to screw with you.

As I grew older I played less and less videogames, having realized that they were taking a huge chunk of my time that I could have used for more productive endeavors, such as writing a magnificent blog. But I have never stopped indulging every now and then.

I’ve never been a fan of car games or first-person shooters. To me, gaming is about a story that unfolds through your actions, while your character’s ability and personality grows. That is why I almost exclusively play RPGs, graphic adventures or real-time strategy. The other types of games seem more suited for the sports types; I’ve always been a nerd. I don’t want to display feats of skill, but to use my brain to get out of certain situations.

The Secret of Monkey Island

The Secret of Monkey Island. Ah, the memories. (Photo credit: Wikipedia)

Playing videogames has always made me feel a little guilty. My father used to tell me I should call them “solitaires” since I was playing them alone. I guess it was his way of telling me I should be out there hanging out with real people. They have always been associated to wasting time: why play videogames when you could be reading a book? What’s funny is that, a couple centuries ago, reading books was also associated with idleness. Cinema was a similar guilty pleasure, until it recently started to be viewed as an art. Could the same happen with videogames?

I’d say yes. Not with all videogames, for sure, just like Transformers 2 probably does not qualify as art. Casablanca, however, does. And I’d say Monkey Island does too, since it is an absurd comedy in the line of Billy Wilder or the Monty Python (I’m not saying it’s as good, though).

Videogames, just like cinema, have experienced a tremendous evolution. The first games, like pong, were a little like the first movies by the Lumière brothers: something extremely simple made in order to wow the audience and show them the capabilities of those wonderful new machines. But graphics got better and stories got more complex; genres appeared and diversified. I am being deliberately ambiguous to show the parallelisms between videogames and cinema.

On the left is an Atari 2600 with Freeway, a g...

On the left is an Atari 2600 with Freeway, a game based on a bad joke. Pictured right is a Magnavox Odyssey, running the Tennis game that Nolan Bushnell copied for Pong. (Photo credit: Wikipedia)

But videogames are different from cinema and books in a big way: interactivity. In every videogame you have the ability to manipulate the actions of a certain character in order to achieve some goal. What you do matters: this had never been done before (except maybe with table-top RPGs and “choose your own adventure” books). Interactivity, however, is a matter of degree: do we allow for the players’ actions to truly affect the story, having different endings depending on their decisions? Do we allow for the manipulation of any environment object? Do we enforce some type of morality or allow players to choose theirs? Do we just provide a world and allow the players to do whatever they want?

In the same vein, one needs to decide which skills will be the most important in order to achieve the game’s goals. Will it be reflexes? Intelligence? Speed? Precision? Patience? Yes, in some games (Diablo comes to mind) you need mostly patience. The patience to spend hours and hours playing in order to make your character stronger.

Art seeps into videogames through many different layers. First, through the graphics, which are sometimes extremely beautiful and original; second, through the music. Believe it or not, sometimes videogame music is extremely good: “sworcery” (an iPad game) or “Journey” come to mind; “Chrono Trigger” also has an excellent score, even with the limited instrument palette that came with the SNES. And maybe it’s for sentimental reasons, but the Final Fantasy VII melody and overall ambience really manage to affect my mood.

A screenshot of the game illustrating a new sc...

A screenshot of Chrono Trigger. (Photo credit: Wikipedia)

There is more, of course. The script is becoming increasingly important (though it already was during the 90s: see “Day of the Tentacle” or “Sam’n Max” from LucasArts), as well as the story. In fact, that’s what gets me hooked: I just need to know what happens next. And some games have amazing stories with plenty of plot twists, which may be hard to believe for people who don’t play computer games regularly. With the script comes voice acting, which is getting better every day (“DragonAge: Origins” was particularly good and included Claudia Black from Stargate).

And, of course, the game mechanics. Whether this is an art form is of course arguable, but there’s no denying finding proper game mechanics which are engaging, fun and have a proper learning curve is anything but easy. Games like Starcraft continue to be played more than a decade after they came out, precisely because the game mechanics were so perfect that gameplay got as complex as the players’ imagination. The game was so finely balanced that every skirmish against another human was unique and unpredictable, a true battle of wits that people actually watch like a sport. This is quite an achievement, art or not.

So there it goes: my fifty cents on videogames. What do you think?

  1. Are videogames art?
  2. Are they a waste of time?

Is there any videogame you consider being above all others? Any fond memories?

Enhanced by Zemanta