Coding for Kids

I’ve had multiple conversations recently about teaching kids to code – where to begin, what resources to use, how to navigate when the parent/teacher/responsible adult has no coding expertise. So I decided to put together this page to share what I’ve learnt and compile some useful resources. Anyone can learn to code. Everything that I share below is for anyone of any age (well, maybe from about 2nd/3rd grade upwards). You can learn along with your kid/students. Don’t be afraid to ask the internet questions – it’s what all good programmers do. There’s a big community out there and they often have the answers. That’s all part of the process of coding.

Why?

Computers have become a ubiquitous part of our lives. If you know how to tell a computer to do something, you have a really useful, powerful skill. And it’s a skill that is important for many different fields. Computer game designers. Movie animators. Stage lighting design. Engineering. Science. Software development. Website design.

But, why I think you should learn to code is:

Coding, or writing a computer program, requires you to think logically, to problem solve. It teaches you how to accept failure, and work past it. It gives you the freedom to be creative and express yourself. It encourages you to be brave, not perfect – something that’s important for us all to learn.

Where to begin?

Scratch

For first time coders, I highly recommend Scratch. It’s a block-based programming language that’s really intuitive. It’s great for building small animations, or stories, or games. One of the great things about Scratch is you can see other people’s projects, try them out, look inside at the code, then “Remix” it (save a copy as your own and change it). It’s a useful way to learn how to do something – copy from someone else. It’s how even the most proficient programmers learn new things.

Scratch has a bunch of tutorials and other features that gets you familiar with the platform. These are the best place to start. They walk you through the platform, and how to use it. The students I’ve worked with always pick it up really quickly.

You can build projects without an account, but you can’t save them, so it is best to set up your own account. That way, you can come back to your project later and update it. It also means you can share your projects with your friends, or your class. If you’re working with a group of students, you can set up a “Studio”, and they can share any completed projects there to make them easier to find. We set one up for our Girls Who Code club.

I only have good things to say about Scratch. The students really enjoy working with it. It’s colorful, fun and there’s a lot of scope for the projects you can build. You can add music. You can upload pictures and images of your own to include in your project. It allows you to be creative. There’s no rules. You can do whatever you like. The challenge is figuring out what to make!

Girls Who Code – the book

Girls Who Code is a non-profit aiming to close the gender gap in the tech world – see this post for some more details. The founder, Reshma Saujani, wrote a great book Girls Who Code: Learn to Code and Change the World. It does a really great job at teaching computational thinking – the type of logic and problem solving approach to use when building a computer program, or writing some code. The book itself doesn’t necessarily teach you how to code, but it walks through the process with fun examples. What I really like about it is how it covers the whole process of developing a program, from brainstorming an idea, to drawing out a framework for your program and teaches some of the coding techniques you’ll need to write your code (for loops, logic statements, etc). It uses examples that aren’t necessarily computer based e.g. like building a sandwich, that helps to understand the concepts. The book is targeted at girls, but it doesn’t need to be only read by girls.

Games + Interactive Learning

There’s some great games and interactive tutorials that also teach computational thinking and some of the techniques you use to write code. One of the best resources for this is code.org’s Hour of Code activities. There’s a lot of different tutorials to try, with a range of different themes and age group recommendations. These activities are mostly designed as small games or challenges, where you learn new coding skills as the “game” progresses. I’ve had pretty good success with these kind of activities. They work pretty well in a group environment, where multiple students can work on one together.

One other fun activity that falls heavily in the game category is the Google Doodle – Celebrating 50 years of Kids Coding. I love this, it’s simple and fun, but gets pretty challenging towards the end. It’s a prefect for teaching some coding techniques.

I’m ready to write code

If you want to jump into writing text-based code, there are a lot of different resources and tutorials out there. I haven’t really worked with these, but one platform I’ve had a lot of success with is Trinket.

Trinket.io

Trinket is a great platform for writing and running code in a browser (i.e. on the internet). You don’t need to install anything on your computer. It supports a range of different programming languages, and has a selection of tutorials to go through. There’s a really nice tutorial that uses blocks (like Scratch) to animate a turtle, but it also has a window where you can see how the program you’ve built with blocks translates to Python code. It’s a nice way to transition from block based programming to text-based. I’ve used a similar tutorial (but on a different platform that you now have to pay for) in the past, and the students quickly picked up what text to type without dragging the relevant blocks over.

Again, you can go through the tutorials without an account. But setting up an account will save your progress, and let you build and save your own projects. There are also paying options to give you access to some more features. But I’ve found the free account still has a lot of flexibility and tutorial access.

Like Scratch, a nice feature about Trinket is the freedom and flexibility it gives you. You can create a project (or “Trinket”) completely of your own, starting with a blank page. Our Girls Who Code club used it to write the code for a recipe website (and we hosted the website through GitHub). No promises the website runs smoothly… we never fully polished it off.

Game + tutorial based learning

There are a lot of tutorial based websites out there. These are similar to the code.org style – tutorials to build small games or animations. They are great for teaching some of skills and coding techniques. I haven’t worked with too many of these, and a lot of them cost money. Khan Academy has some tutorials, and I know others who have used these.

I ran one class following “Invent Your Own Computer Games with Python”. The book is available for free online, or you can buy a hard copy. In the words of the author

Programming isn’t hard, but it is hard to find materials that teach you to do interesting things with programming. Other computer books go over many topics most new coders don’t need. This book will teach you how to program your own games; you’ll learn a useful skill and have fun games to show for it! This book is for:
• Complete beginners who want to teach themselves programming, even if they have no previous experience.
• Kids and teenagers who want to learn programming by creating games.
• Adults and teachers who wish to teach others programming.
• Anyone, young or old, who wants to learn how to program by learning a professional programming language.

It’s a fun, and the students really enjoyed making small games (I did this with a small group 5th graders). It walks you through the setup you need to do on your computer with lots of details and pictures. I highly recommend this approach. It doesn’t quite have the complete freedom of Scratch/Trinket, but I think it’s a really good nonetheless. A big challenge in the transition to text-based coding from Scratch can be the creative aspect. But this book walks you through text-based coding by building small games, and I think that connection with the creative side of the brain helps students visualize other things they could write code to do.

On writing this post, I noticed the author has a bunch of other books (including one for Scratch). I’ve not vetted these, but knowing the author’s approach, they are probably worth checking out. Al Sweigart, the author, makes all his books available for free online “because programming is too valuable and needs to be accessible to all” – thanks!

A few parting thoughts

The games/tutorial/interactive learning are really great approaches for teaching coding techniques, and getting into the practice of computational thinking.

Scratch and Trinket allow for user freedom and creativity. They teach you to go through the full process of building a “program”, from conceptualizing the project, to completion.

I think combining both these approaches is a great way to teach kids some coding skills.

A lot of the above can be done as an individual. But, they can also be done with a group. If you’re working with Scratch or Trinket in a group setting, a fun approach is for the group to come up with a topic or theme that they can build their projects around. For example, you could have the students all come up with short projects showcasing their hobbies, or fun things to do outside. Then each student can plan and build their project, sharing progress with the rest of the group. I haven’t tried this out, but I think this approach could work well in the virtual learning environment we currently find ourselves in. Students can work on their projects on their own, and when they connect with the rest of the students they can show each other their projects. Or work through some of the tutorial style activities together.

There’s lots of flexibility here, and ultimately you need to figure out what works best for you.

Good luck!

Back to Top