Meta

Coding with Kids Doesn't "Bug" Me!

One day my daughter will be putting my code to shame, and I can't wait.

Coding with Kids Doesn't "Bug" Me!

What's not shown in this (very old) video is the pair of air horns that fired off to announce the "explosion." Those things were seriously loud, you didn't want them going off while you were in the middle of defusing.

I bring all this up because I have fond memories of hacking out some code and not knowing for sure that it will work until it was loaded up, and run, on the PICAXE. Watching LEDs blink and buzzers sound, hoping like hell that 30 minutes later the "explosion" would go off as coded.

Fostering the Coding Bug

After a bit of searching, and considering a Raspberry Pi, I settled on CodeBug. This board started life on [Kickstarter](Fostering the coding bug) back in 2015. It features an online IDE with a Scratch like language called Blockly, and the resulting code can be downloaded and loaded up on the bug.

Transferring your code over to the CodeBug is as simple as this sort of thing gets. Hold down the A button while plugging in the USB cable and it shows up in Windows as a standard mass storage (USB) device. Drag, drop, done.

This simplicity is the main reason I chose it. It's also a cute little device (it looks like a bug, obviously) and has a few good first party add-ons, such as cases, LED stars and "GlowBugs". I'm not linking to each of these, they'll come up at whatever retailer you're looking at for a CodeBug, but it means there are a lot of cool options.

First Project: Name Badge

This morning, after numerous inquiries as to when we'd start coding, Ella and I settled in at the computer to get to work. Her first project was a name badge which scrolled the letters of her name across the 5x5 LED grid.

I let her take prime position in front of the desktop and I setup my chair over to the side (furthest away from the mouse so I didn't try taking over!) She took to the interface like a duck to water.

Check out her finished code here:

And a video of it running on the CodeBug itself

I Don't Know What I'm doing!

I'm no teacher, but I hope I can help shepherd my daughter through some programming concepts. I mentioned above I specifically sat so that I couldn't take over the mouse and do things for my daughter.

All of the blocks in her code were chosen, dragged, and snapped together by her.

How the session would go is along the lines of asking her leading questions and then giving her the keyword she was looking for in the list of options. For example, once she realised her code ran once and then terminated this exchange happened:

Me: Remember how I said it starts at the top, works to the bottom and ends? Do you want it to go back to the top and show your name again?

Ella: Umm... yes.

Me: That's called a "loop", can you see loop? Good work, what do those options say?

Ella: "Repeat 5 times" or "Repeat while true"... what does that mean?

I'd then explain the difference and what she could change about the first option. If you noticed her counting in the video, that's because at the time it would repeat on a button press 10 times. She was making sure it worked!

What's Next?

Tomorrow morning we're going to work on a dice roller. Ella is likely to be getting an introduction to variables and random numbers (unless she figures out some other way to do it!)

We've also got alligator clips ready to go to hook up headphones at some stage and make some sounds. I'm sure we will continue to make this a regular thing.

One day she'll be putting my code to shame, and I can't wait.

0 Comments 0 Comments
0 Comments 0 Comments