As programming itself has become more popular and integral to our economy, environments and resources to teach it to kids have boomed as well. There are options for teaching kids using games, storytelling, animation, and robotics, among other things.
This guide is focused on elementary and middle school students. For older students, who are likely more concerned with the practicality of programming, refer to How to Choose a Programming Language.
Why is coding important for kids to learn?
While some people suggest coding is the new literacy, the jury’s out on whether coding will join the basic curriculum. It’s better to think of coding as a skill similar to music, art, or woodworking — not a necessity for everyone to master, but highly enriching and worth giving every child a chance to try.
In addition to programming itself being a useful skill, there’s a body of evidence that practicing programming can boost other skills. A 2018 meta-analysis (meaning the researchers synthesized existing research rather than conducting a new study) found that learning programming benefited mathematical skills, creative thinking, and metacognition, the ability to assess one’s own thought process. And, like any skill, learning programming can build confidence.
Eventually, programming can be the basis for a computer science or software engineering degree or a career. But even if your child doesn’t take it that far, there are many benefits.
Visual vs. Textual Programming Languages
Visual languages are better for younger students, as they demand little-to-no reading, whereas textual languages are a better fit for older students. However, if you want more information, read on.
Textual languages resemble the ones often seen in movies—cryptic sequences of commands to the computer, although the opaqueness and the speed at which computer programmers work is exaggerated for dramatic effect. Virtually all real-world software is written using this kind of code. For example, a program might begin by using the open command to open a file, a second line that adds a line at the end using write, and a final line that closes it.
Visual languages aren’t popular in industry, academia, or among adult hobbyists, but they are common in education because they remove some of the hurdles of textual languages at the cost of power and flexibility. Rather than writing code using words and punctuation, visual languages use shapes, lines, and colors to represent individual instructions or logic. In most educational visual languages, students snap together blocks. This eliminates typos (very little is being typed) and relies less on memory (the various kinds of blocks are laid out on screen). The example program from the previous paragraph might be “rewritten” as a visual program by dragging a block that adds a message to the end of the file into their program. Then, they could click inside the new block to type in the message they want added to the end.
Visual languages are ideal for younger students who aren’t yet fluent readers. They can also be a good fit for older elementary school students, because visual languages mean students are not as limited by the accuracy of their typing and can instead focus on the concepts.
However, once students reach middle school, the value of visual languages declines. Many textual educational languages, and even some real-world languages like Python have a small number of different keywords to learn and use a minimum of punctuation, so learning the written representation isn’t a big obstacle for older children. Textual languages tend to be more powerful and are more usable for programs that involve more than a dozen or so commands. For children in middle school and above, the advantages of visual languages are not worth their limitations.
1. Learning from community classes
Public libraries are increasingly offering programming classes aimed at kids. These might be taught by library staff or a community member with a background in programming. These are a great way to get started, as they tend to be free and don’t require a ton of background research on your part. Your child can also potentially meet other children who have the same interest.
In addition to public libraries, coding dojos are free programming clubs aimed at kids that have sprung up in a number of communities. These exist entirely for the purposes of teaching programming, so they are more likely to offer classes year-round and at a variety of levels.
2. Learning from a tutor
Coding tutors can be particularly helpful because, unlike other subjects you might help your child with, you didn’t necessarily study it in school yourself. Also, it can be beneficial to have a tutor to provide structure and to encourage the child to persist when they get stuck.
Even if hiring a tutoring on a regular basis isn’t a good fit, you can also hire one for a single lesson to either kickstart their learning process, or step in when your child gets stuck.
It might be difficult to find a tutor with specific experience in the educational programming language your child uses. However, you can still tap into general coding tutors. Educational languages are designed to teach concepts shared among all languages, so specific expertise is not as necessary.
3. Learning from Games
A great way to learn from code is from making or modding video games. After all, video games themselves are made of code. Modding simply means creating packages that add or change a game, which are called mods.
Kids can code Minecraft using Java, which is the original modding approach and the one used by many popular mods. However, Java can be a challenge for new programmers. Besides the difficulty of the language itself, it also requires the student to do some of the initial setup to get their coding environment ready to work with Minecraft. Between these two obstacles, using straight Java will be probably be frustrating to most kids who haven’t programmed before.
The final option is sort of a hybrid approach. MCreator is a popular tool that simplifies the process of creating a mod, including a block-based language that also simplifies the process of writing Java code. Because it supports making mods of a variety of different complexities, students can grow into it. Of the game-based options, it’s probably the best option for learners in middle school and above, assuming you already own Minecraft or the cost is not an obstacle.
Another company, Tynker, has options in all of these areas: the puzzle-solving projects, Minecraft modding options, and creative options. They also have a unique option for younger kids: voice commands. Because voice recognition can be hit or miss, consider doing a free trial to ensure it picks up your child’s voice if this is a feature you expect your child to use. Perhaps because of the breadth of its library, it’s also costlier than the other options.
One downside of all of these options is that they have some cost. Codemonkey has a monthly or annual subscription. Coding Minecraft requires a copy of Minecraft, and in the case of Tynker, a separate subscription. If you already have a copy of Minecraft, using straight Java or MCreator can be done without any extra cost.
4. Learning from Storytelling
A popular option is Scratch, which is an animation-focused programming language. Scratch pioneered the block-based approach that’s used by some of the game modding tools discussed above. For example, a student might drag a component to move a fox character off screen, add a second component that makes the fox speak, and then add a third component that makes another character react.
One advantage of Scratch is that it’s completely free and doesn’t require installing anything on the computer.
5. Learning from robotics
Programming a robot can be a great way to learn programming, particularly since they also give children the sense of making something tangible and give them a break from looking at a screen. They can also be a way of piquing the interest of younger kids, as they can chase or block their older sibling’s creation (with the caveat that they be supervised to avoid swallowing a piece or breaking the robot).
Lego has been a long-time leader in educational robotics sets, including its Mindstorms and Boost sets. Boost sets are more entry-level but are less flexible. The Mindstorms sets are more advanced and have multiple choices of programming language. Both sets are compatible with the usual Lego bricks.
UBTech is a relative newcomer, and differs from Lego in that it’s a primarily robotics company, rather than a toy company. Compared to Lego, there are fewer options for the programming language. Still, the parts included are more than enough to keep a beginner busy.
The downside is that to program a robot, you need a robot, which can be expensive. As a result, robotics kits are probably a better option for kids who have a strong interest in both robotics and programming.
6. Learning visually
The classic way to learn programming is through turtle graphics, so named because the student programs a turtle-shaped cursor that moves across the screen and makes drawings. For example, a student could program a turtle to draw a square by moving in a straight line, turning 90 degrees, and repeating that for the other three sides.A great way to do this is using Python’s built-in turtle module. That gives students the chance to play with graphics in the context of a practical and flexible language, Python. Two ways to get started are this tutorial or this video series. To get started, install Python and open the included IDLE program, which acts as a Python editor.
Besides drawing, the turtle module also allows the student to adapt their program to react to keyboard and mouse input, using a simplified version of how real-world programs handle interactivity. For example, the turtle could be programmed to follow the user’s mouse, or to change color when the user press ‘C’.
It’s often good to let your child’s interest be the guide, especially if your child is younger. Any of these options will give your child the building blocks that they can later apply to other programming languages if they want to go further. However, if your child is at a loss given these options, consider starting a younger student with Scratch and an older students with MCreator.
If your child starts to struggle, your first instinct is probably to encourage them to keep up with it. That instinct is correct, but there are other things they should do besides persisting. If what they’re working on is particularly ambitious, encourage them to either simplify or break down their program into parts. Once they get them working, they can scale up their ambitions. Not only is this a good way to stave off frustration, it’s often how professional programmers work. Another technique is to seek out alternative explanations. If the tutorial is confusing, look for a video or hire a tutor.