WOMEN IN TECH

From Unicorns To Robots: Further Coding Adventures Of A Nine Year Old Girl

Hot on the heels of International Women’s Day and the launch of Splunk’s Million Data Points, it feels like the right time to write the next installment of my daughter’s foray into coding. After developing her first “Unicorn Rainbow Jumping” game in Scratch, Anna decided she wanted to try another language. Henry, my son (mentioned as he wasn’t happy that his sister was getting all the blog publicity), has been using a tool called Kodu Labs at school, so in true sibling rivalry fashion, she decided to try that.

Getting Started

Kodu Labs is a graphical way of learning how to code and teaches the fundamentals of objects, methods, loops, if/then statements and parameters - but all in a very simple way. If you have children that play Minecraft, they’ll probably enjoy Kodu Labs. After installing (sadly only on Windows today), you create a new “world” and are faced with this screen:

From there you can start creating your own “world” by adding ground, mountains, rivers etc.

Kodu Labs character select

After the terrain,  you can create your own character . In this case Anna chose a “cycle robot’ and this then appears in the world you’ve created:

You’ll notice in the picture above a couple of red circles. These are apples that Anna also placed in the world - but we’ll come back to those later...

So here is where the coding comes in. To control your robot, code is needed to determine how to drive your character around. Also, no game is worth playing unless you can fire some-form-of missiles, so Anna also coded that if you press the space-bar then you can shoot pink rockets.

You can see above how easy it is to create the code. Anna defined that for her cycle robot (object), by pressing the arrows it moves “quickly” (parameter). Likewise, by pressing the space-bar, the character then shoot missiles with colour “pink”. Basic concepts, but holds some fundamental coding principles.

Scoring Points

Next up, a way to score points and win the game. To do that, Anna added a way of scoring by bumping into an apple. She then looked at all the options, and added the code for the cycle robot that states if you bump into an apple, then score a point (in pink again). When the score reaches 100 - you win the game!

Defeating Obstacles

To add some challenge, we decided to put some baddies into the game. We created a path where the bad robots could move:

After putting a suitably evil looking flying scorpion robot on the path, we tried out the game. When the bad-guy robot saw us it started shooting as we tried to collect 100 apples and score points.

It turns out that driving the robot, collecting apples and shooting missiles wasn’t the easiest, so Anna decided to code “automatic shooting” when our cycle robot saw the evil scorpion robots:

When you put it all together, the code for the robot looked like this:

And to prove the game actually worked – here’s Anna’s robot blowing up the evil scorpion robot:

We had a lot of fun doing it. Scratch was more “coding” focused, but Kodu Labs is probably a bit more accessible and teaches some of the fundamental programming constructs pretty well. You can also make quite a fun game to play in less than 30 minutes.

Have fun coding and as always, thanks for reading.

Matt

Matt Davies
Posted by

Matt Davies

Matt is Splunk's Head of Marketing for EMEA (and part time Chief Colouring-In Officer). He's responsible for developing and executing marketing strategy for all of Splunk's core platforms in EMEA, working closely with Splunk customers to help them understand the value that new insights from machine data can deliver to their business. Matt is also one of Splunk's technical evangelists and communicates Splunk's go to market strategy in the region. Previously Matt has worked at Cordys, Oracle/BEA, Elata, Broadquay Consulting, iPlanet/Sun, Netscape and IBM. With nearly 25 years in the software industry, Matt has extensive knowledge of enterprise IT systems.

Join the Discussion