Originally posted on onezero.medium
Spend a weekend — or a monthlong at-home break — giving your kids a taste of programming
ou’re like millions of parents across the world, you’ve suddenly crashed into an unplanned at-home break with your kids. Many of the usual options for educational enrichment — museums, galleries, concerts — are shuttered. Helpful distractions like parks and playdates have been swallowed up by new rules of social distancing. And the odds are good that you’ll need to balance the chaos at home with the ongoing remote work requirements of your own job.
Here’s the good news: There is a way to keep your kids busy and help them learn something truly useful. Best of all, they can stay in their pajamas while they do it (pending parent approval, of course).
The answer is learning to code.
How to find good learn-to-code activities
In the past decade, the world has gone crazy for code-themed education. There’s an iPad app or battery-devouring robot caterpillar for every age. Many of these toys and games are perfectly fun activities that do very little to teach actual computer science concepts. To be kind, they overpromise. (To be less kind, their claims are bunk.)
After three daughters and plenty of experiments, I’ve learned that you get the best parent-effort-to-child-learning ratio when you start with smaller chunks and discrete activities. I call this approach a “taste of programming,” and — in true nerd parent fashion — I used my experience to build a flowchart that can guide you through the options.
Programming off the computer
Most programming involves sitting in a chair and staring into the glowing screen of a computer. But as the flowchart shows, there’s another path — you can go offline with activities that take place in the real world.
For a light taste of code-themed entertainment, try RoboRally. It combines the old (it’s a board game) with the new (algorithmic thinking). Each turn, you plan out a short routine of instructions that you hand to your robot to “execute.”
For kids who love to read, there are a few gems buried in the avalanche of STEM (science, technology, engineering and math) titles at your local bookstore. Go past the hollow picture-book tutorials and pick up Computational Fairy Tales by Google principal engineer and algorithms expert Jeremy Kubica. It’s an insightful look at actual computer concepts that come to life in a fictional world. (Lauren Ipsum is another good read.)
Many of these toys and games are perfectly fun activities that do very little to teach actual computer science concepts.
If you’re ready to start programming at a computer, you face another choice. Should your child use a text-based language or a visual one?
Visual languages let kids assemble a program by snapping blocks together on a blank canvas. It makes for a lot of clicking and dragging, but it’s also a perfect first step for kids who don’t yet know how to type.
There are plenty of visual programming languages in the world. Here are the most well known:
- Scratch is the original free visual programming language created by the MIT Media Lab. The best part of Scratch is that it’s completely open-ended. This is sometimes the worst part, too, because many kids spend all their Scratch time making artwork or scripting stories. (Which is fine — an afternoon of art and creative writing is as good as an afternoon of coding.) For a particularly timely example, check out this Scratch epidemic simulator.
- Blockly is a Google-created visual programming language. It powers the simple coding simulations on the Hour of Code website. These are fun for a quick diversion, but kids won’t learn nearly as much as they will if they make their own programs. You can also use Blockly to control the whimsical Dash robot from Wonder Workshops — super fun, but pricey.
- MakeCode is Microsoft’s visual programming language. You can use it to build simple arcade games or to twinkle lights and play music with the affordable (roughly $20) micro:bit board. (The micro:bit is a great option for kids who are interested in electronics because it brings their code out of the screen and into a real-life object.) Or, if your kid loves Minecraft, they can use MakeCode to hack their favorite game and learn a bit of programming on the way.
When your kid is ready for a bit more challenge (and a lot more freedom), it’s time to step up to a traditional text-based language. But which one?
If you don’t want to make web apps, the easy top choice is Python. No language so neatly spans the vast ocean between beginner programming and serious work, stretching from simple games to data science. The book Python for Kids is a great starting point. But to get the most fun for the least amount of work, I recommend pairing Python with the game-creation tool Pygame Zero. It draws on the popular pygame toolkit but simplifies it radically, saving new coders from writing huge blocks of boilerplate code. It’s such a good first choice that there are barely any second choices worth mentioning.
HTML and the web
The challenge of writing web apps is obvious: There’s a stack of technologies to master. The advantage is that a web app can run on almost any computer or device in the world, with no setup required. For kids, it offers the perfect way to share their creations with friends.
Before anyone can put code in a web page, they need to have some understanding of HTML, the markup language that structures the content in a page. But you don’t want to spend too much time on HTML because writing web pages is a poor second cousin to writing code. So how do you fill the gap?
One option is a course like Khan Academy’s Intro to HTML & CSS. But it’s often quicker (and more fun) just to let your kid experiment with some sample HTML markup. One of the best tools for this job is X-Ray Goggles, a Mozilla-created project that lets kids manipulate the HTML on the sites they visit. It’s like a simplified kid version of the Chrome DevTools.
I’ve learned that you get the best parent-effort-to-child-learning ratio when you start with smaller chunks and discrete activities.
But if you get to this point, you’ll be far beyond a taste of programming. You’ll have invited your kid all the way into the crazy, fun, frustrating world of software development. Is it a life skill that every child must master? Probably not. But it is a useful trick to keep in your back pocket.