Coding has quickly become one of the defining skills of the 21st century. Coding involves problem solving, logical and sequential thinking, and mathematics–as well as its own set of language/literacy skills. We’ve put together a list of ideas to help you learn coding or teach your child coding, with recommendations grouped by age.


This may surprise you, but even kids in preschool aren’t too young to start building the foundations for coding and computer science! You just have to get creative about how to address it in an age-appropriate way. There are great apps out there for teaching coding to preschool kids, but you don’t have to have any special equipment either. Let’s start with some games and activities you can do that don’t require any devices.

  • Play Simon Says: This traditional kids’ game is a great way to introduce the concept that computers only follow instructions that are programmed into them. And computers wait to hear those commands worded a certain way. Without those words, nothing should happen (unless, of course, you’re a human!). Play Simon says with your child where you are the Simon for a while, and then let them be Simon and they can program you!
  • Play Cyborgs: I learned this technique from educator and computer scientist Ean Moore, who has used it to teach Python coding here at the library. He tells the kids that he is “Cyborg.EAN” and they have to program him to sit down, or to pick something up and carry it over to a table and place it on the table. The kids yell out commands like “Cyborg.EAN Command Take the pencil. Cyborg.EAN Command Walk five steps.” Then he might say, “ERROR” because they didn’t tell him what direction to move in. So he drops the pencil and returns to his starting position, and the kids have to try again. They have to develop a code that will give him every single instruction he needs to carry the pencil all the way to the table–leaving nothing out!
  • Search for Buried Treasure: Part of coding is learning how to give the computer instructions spatially. For this, it helps if kids start learning how to read a basic map. Hide a favorite toy somewhere in your living room, and make a map of your living room to help your children figure out where the toy might be. Your map should show them where to start, and you could give them instructions like, “First, walk seven steps forward, then take two steps to your left, then peek behind the couch.” For extra fun you could make it a scavenger hunt with clues sprinkled all around.
  • If you have a tablet or smartphone, try one of these apps! Pango One Road is a game where you help a character to navigate a maze and pick up objects by coding his path for him with your finger. Hopster Coding Safari also involves getting a character from point A to point B, but uses a drag-and-drop set of instructions for which way to turn or walk. Thinkrolls Space is a slightly more challenging puzzle game where you have to get a character from one place to another while also making sure certain conditions are met first, and you have to figure out the order in which to use each tool. For a preschooler, this one is great for coplaying with a parent.

Elementary School

With elementary school kids, definitely many of the games listed above for preschool can also be played and enjoyed up to about age 10. And since elementary school kids have more of the mathematical and linguistic foundations for coding already, you can take them farther and get more creative and challenging with them. Here are some coding activities that build on your school-age child’s growing skills:

  • Build with LEGOS: Writing instructions is an important part of coding, and those instructions need to turn out the same way every time. You could ask your child to build something with LEGOs, and then to give you a set of instructions so that you can build the exact same thing. Their instructions have to be right though, or else your project might look different! You can join us on Fridays from 4:30 – 5 pm for our LEGO® Weekly Builds on Instagram at @pasadenalibrary. (And when you’ve built something creative and cool, share it with us by submitting it to our Design Your LEGO Contest!)
  • ScratchJr: This is a free app (for smartphone or tablet) that introduces early elementary school kids to the basics of Scratch, a rich coding language with lots of possibilities, created by MIT (more below). Using different colored blocks, kids make a sequence that tells the computer to make a sound, move a character, change a character’s appearance, and more.
  • Scratch: This is the original web-based programming platform created by MIT to teach kids the concepts of coding. The possibilities with Scratch are pretty vast, and because it uses blocks that are drag-and-drop, you don’t have to already know any coding language to have a fun and satisfying time coding a complex project such as a video game or an animation. If you’d like some inspiration, check out the Scratch projects we’ve done at the library.
  • Here you can find tons of Hour of Code classes grouped by age or grade level. One of the fun things about classes is that they incorporate many of kids’ favorite TV and movie characters, as well as popular games like Minecraft, with easy step-by-step tutorials that are perfect for beginners. We’ve enjoyed using in library programs to introduce kids to HTML and CSS, videogame design, and challenges related to Artificial Intelligence.

Middle School

By middle school, kids have most of the mathematical knowledge they need in place to be able to dig in and do some complex coding projects. Middle schoolers and teens also find the block-style coding fun and rewarding, but some may feel they are ready for learning the written code with all the commands and proper syntax. So this is where I’ll highlight some of the coding programs that are good for learning written code, but keep in mind a child doesn’t HAVE to be in middle school to try some of these.

  • Scratch: I’ve been doing Scratch for many years and I’m always learning something new. Middle schoolers can tackle more complex projects involving more sprites, variables, broadcasts and algorithms.
  • They have coding activities specifically designed for middle school and high school. I recommend their website for learning HTML and CSS code, very important in web design, and something that I think middle schoolers are ready for. We found their “Web Lab” useful for our HTML and CSS coding classes at the library.
  • CodeCombat: Learn code while playing a game, in which you have to use code to move your hero through the challenges. You can choose to learn Python or JavaScript — or the experimental CoffeeScript–all while fully immersed in a video game world of medieval knights and quests.
  • Blockly: Teaches JavaScript in a format that will be familiar to kids who have done Scratch, because kids will be dragging blocks into place. But the blocks are then converted into written JavaScript code so that you also get that exposure. The challenges start easy and get gradually harder.
  • Khan Academy: This education website offers a vast array of courses on all kinds of subjects, including coding. You can start with some of their Hour of Code tutorials.
  • Code Monster: Teaches JavaScript in a step-by-step tutorial showing the code on one side and its effects on the other. Go through the tutorial with the help of a friendly monster who will suggest things to try.
  • Minecraft: Experienced Minecraft users know that you can accomplish a lot more in Minecraft with programming. You can start by programming turtles to execute a code to help you lay more bricks faster or mine for resources faster. (We did this at the library with help from LA Makerspace!) If you want to get really advanced with hacking Minecraft, you can also download Microsoft MakeCode and make your own JavaScript code, using blocks that can be translated to JavaScript. MakeCode also works with other external computer/robotics toys like Wonder Workshop and LEGO Mindstorms.
  • Coding Glossary for Kids: A student in a local STEM club submitted this page to me to share with you all! It’s an excellent glossary of coding terms that could be helpful in understanding what words like “event handler,” “parameter” and “variable” mean in the realm of software programming. (Thanks very much to Myra and to her teacher Miss Martin!)

High School and Up

In our Internet-heavy economy, it’s so important to have some coding experience, no matter what kind of job you have. As a librarian, I use a lot of code–especially HTML–in writing these blogs, publishing newsletters and subject guides for finding library resources. Here are some resources that will give you real training so that you can add coding to your resume!

  • Codeacademy: There are free lessons or you can upgrade to a pro membership for a monthly fee. There are fourteen different code languages you can learn, with various applications for web design, game design, computer programming or robotics. You can create an account and follow along through all of your classes and keep track of your progress.
  • Khan Academy: I really like their HTML and CSS course–it’s pretty comprehensive!
  • Again I recommend the “Web Lab” for learning and practicing HTML and CSS. But there’s also a pretty cool “App Lab” for building your own working app!

Are there any other resources that you think we should include in this list? Share them in the comments and I’ll update the post.