Several Hours of Code

The Hour of Code is a global initiative intended to demystify code (ie computer programming) and show that anybody can learn the basics. The idea is to get kids (or anyone, really) to do at least one hour of coding,  in a fun and relaxed way that many won’t even recognise as coding. This provides them with an introduction to computer science and hopefully lay the foundation of a skill that can be tremendously useful in years to come.

Hour-of-CodeLast week, the Science Centre set up a few computers in one of our galleries and invited everyone to come and try their hand at coding. The computers ran things like Lightbot, Blockly Games and Scratch, which introduce programming concepts – sequential instructions, procedures, loops, conditionals and the like – as games and very basic applications.

But you didn’t even have to touch a computer, as there were also some code related paper-based activities, like ‘Pixels to Pictures’, which involved shading grid cells based on coded instructions to arrive at a picture, or the ‘Not-So-Secret Cipher’ for encoding and decoding messages.

All these activities were facilitated by volunteers from among the Science Centre staff and beyond. And then there were more volunteers who were showcasing some of their personal projects, from programs to robots to networked series of cameras and other maker projects. I joined the event on two afternoons to showcase some of my simulations (mostly my Coriolis Fountain), and to share how being able to whip up such little programmes helped me understand complex phenomena.

I had a few very interesting conversations with some of the parents. Many of them were not just keen to get their kids exposed to programming, they were also very interested themselves. I was asked a number of times how I would recommend they get started if they wanted to learn programming, as they could see how useful a skill that is. Some even realised that a programmer’s way of thinking can help in everyday problem-solving and logical thinking as well, which I absolutely agree with.

My recommendation for those wanting to pick up programming is to have a go at some of the online courses on Khan Academy or W3Schools. I have been using Processing for the last few years, which is simple to use and great for graphics.

As an illustration of how quickly one can whip up a little program (or sketch, as they are aptly called in Processing) that does something interesting, I put together this app I call ‘catch and drag me if you can’ while in the gallery. It has less than thirty lines of code and probably took me, with some tweaking and all, about an hour to put together.


4 Comments Add yours

  1. Kiat Teng says:

    Interesting app, Andy. For the first few seconds, it seemed to be in a state of inertia though and I thought the app was not working since I was able to hover my cursor over the white circle quite easily. After the first few seconds though, I understand why it is called “Catch and drag me if you can”.

    After trying a few times, I think I have caught on the ways to catch and drag the white circle. Thanks for the minute-long entertainment!

    1. Andy Giger says:

      Excellent, I’m glad it engaged you, Kiat Teng. And yes, it can certainly do with some improvements. But that’s the thing about coding, especially in Processing – the idea is to come up with something basic first and run it to see what happens, then start to modify and grow it. This version wouldn’t normally be ‘released’ publicly, if not as an illustration of the ‘first hour’ of a program. ; )

  2. Kiruthika says:

    Hi Andy, nice article, and the catch me if you can game is definitely catchy 🙂 What would you recommend as a low barrier language for adults who are not into programming yet? I know for kids there is scratch and such, but the drag drop interface is quite kiddish even for older (12 plus) kids

  3. Andy Giger says:

    Hi Kiruthika, I would recommend processing ( which was designed to be simple enough for visual artists to pick up programming. ; ) It is great for quick sketches all the way to sophisticated applications, and it has a great community supporting you when you get stuck.

Leave a Reply