Ivan Kusalic - home page

Teaching Children Programming at CoderDojo

Today I’ve mentored the second time at CoderDojo’s local event in Berlin. Though very different, both times it was an amazing experience.


I’ve heard the first time about Coder Dojo at Global Day of Coderetreat. GDCR usually sponsors some worth-while endeavour related to programming and last year we sponsored CoderDojo1.

When I was joining the first time I didn’t really know what to expect. I was also slightly uncomfortable as my German is not quite perfect. I was reassured that it’s ok, and that actually some children speak English as well.

At that time I thought about mentoring children purely as volunteering work. Immediately I was proven wrong – it is much more then just doing something altruistic – it is enriching and surprisingly fun.

Experiencing first refactoring

When I went the first time I was programming in Scratch with a 12 years old girl.

Scratch is a graphical programming language designed for introducing children to programming. It is an amazing tool and I immediately fall in love with it. You use different graphical objects/characters and animate them to build a story or a game. There is no ‘real’ coding involved – you drag-n-drop different programming constructs like ifs and loops to execute preselected actions. That probably sounds very limited, but it’s actually surprisingly expressive. The feedback loop is extremely fast and so it’s also engaging and rewarding for children.

The girl I was mentoring continued working on a project she started at a previous event. It was a survival game that involved dodging falling objects. By the end, it was quite sophisticated game. It included life system where you can get hit up to three times and you lose a life point each time. The total score was calculated based on how long you survived. You could customise objects falling and choose from two different characters.

She was very familiar with Scratch and was in fact teaching me how it all works. We were a team right from the start. At the beginning she’d explain me the problem she was facing and would answer my questions about Scratch and then we’d figure out how to implement what she wanted.

The most amazing moment was when she was trying to attach some functionality to two different ways you could start a game. The problem was that though slightly different, both ways involved the same event to do things like placing the character in original position, restarting timer and life points. After letting her experience the problem a bit more for herself, I explained her why the problem existed. Although she was not aware of it, from there we went into a proper refactoring session where I was also teaching her a bit about decoupling programing elements. After we were done I explained her what is refactoring and why it’s so important. :)

The experience of introducing someone to refactoring was deeply rewarding. I felt I’ve helped someone a bit on a way to becoming a proper software craftswoman. Just amazing. :)

Drawing & programming with a 5-year-old

Today was my second time at CoderDojo. I’ve worked/played with a 5 year old boy who obviously couldn’t read, but spoke 4 languages!

This Scratch session was much simpler than the previous one. I was doing all of programming, while he’d select characters and tell me how he wanted them to interact. We have also drown some characters and objects together.

I constantly needed to adopt to his changing wishes and short attention span. We managed to have a T-Rex chase another dinosaur and roar2 at it when he got close. In the same scene we also had a dragon fly to a tree and set it on fire. :)

While everyone else was packing we started a new underwater scene. We didn’t create many animated interactions but had a cast of characters that included octopus, crab, shark, ‘hand’-drawn jellyfish and sea-snake.

In the end we were the last team to pack – he didn’t want to stop. :) The father picked the boy and we left. We talked a bit about father’s experience raising children in a multi-lingual environment, something I’ve been interested in for a while now.

Go and do it

I guess all of this does not really make sense to you – you need to experience it for yourself. So go and do it! Mentor children. You’d be doing something worthwhile for the future of our profession and at the same time expand your horizons and have great fun.

If you have children, bring them to events like this. They’ll have fun, learn something useful and even get public speaking experience3 if they want. Again, just go and do it. :)

  1. Looks like we’ll sponsor CoderDojo again this year as well.

  2. We recorded the boy making the roaring sounds. :)

  3. At the end of the event children can demo their projects.