Coding sparks initial interest in tech

The last time I had anything to do with coding was in school nearly 15 years ago, when I was 14 and not much older than the upper-primary pupils who will have to take 10 hours of coding classes next year.

It did not go well. I had to use the Adobe Flash programming language and create an animation of a cartoon fox popping out of a hole.

I ended up causing the fox's face to disintegrate as it struggled to escape the terrible gravity of the black hole.

So I was not entirely looking forward to having my coding skills scrutinised in a sneak peek last Thursday of what the Code For Fun programme developed by the Infocomm Media Development Authority (IMDA) and the Education Ministry could look like.

Plus, there was nowhere to hide as I was the only student for the session held at IMDA's offices in Pasir Panjang. But, in many ways, I was pleasantly surprised by what I found.

To begin with, students will not be thrown into the deep end from the outset. Before they do any coding proper, they will first be taught basic coding principles and computational thinking in a way they can relate to and understand.

For example, one activity requires students to break down all the steps needed to buy a plate of chicken rice in the school canteen.

Reporter Lester Wong (left) learning to operate the Sphero robot under the watchful eye of instructor Melvin Lin (far left), a manager in IMDA's digital literacy and participation division.
Reporter Lester Wong (right) learning to operate the Sphero robot under the watchful eye of instructor Melvin Lin (left), a manager in IMDA's digital literacy and participation division. ST PHOTO: JASON QUAH

This reflects one of the four aspects of computational thinking - decomposition, which is a way of understanding complex processes by breaking them down into their constituent parts. Teaching children how to think and learn is as important as the content being taught and I was happy to see an element of this in Code For Fun.


I was then introduced to a spherical robot called Sphero and had to learn to input commands into the Sphero iPad software to make the robot do things like light up. This is done through block-based coding, where coding instructions are represented as colourful blocks which can be dragged together like jigsaw pieces to form a sequence of actions.

My first attempt to make Sphero light up and change colours ended in failure. I had to insert a block of code to delay the colour transition by two seconds to prevent the programme from executing the colour change instantaneously and showing just the second colour.

My instructor Melvin Lin, a manager in IMDA's digital literacy and participation division, attempted to reassure me by saying many students have made the same mistake.

Instructors do not give students the answers outright because such hiccups illustrate the reality of debugging programmers experience.

Through the 10 hours, students are given coding challenges of progressively greater difficulty.

In the final challenge, they are broken up into groups of four or five and have to choreograph a dance for their Spheros. I was told most children manage to accomplish this feat, but having had 10 hours' worth of material condensed into two hours, it was beyond me.

Still, the fact that two hours were enough to get me emotionally invested in robot dancing is a good sign. Code For Fun is, after all, meant to spark an initial interest for coding in students.

It certainly did far more for me than a disintegrating fox ever did.

A version of this article appeared in the print edition of The Straits Times on July 31, 2019, with the headline 'Coding sparks initial interest in tech'. Print Edition | Subscribe