beanz Magazine

Teach Your Kids to Code

Josh Ellingson for No Starch Press

This book from No Starch Press helps parents teach their kids to code in Python. It's a fun way to spend time and learn about an easy to use language.

Python is a really interesting programming language. It’s extremely easy to learn the basics and evolve to creating applications.

Yet Python is geeky. It is used a lot in science fields, as well as scripts and applications in corporations. There are no major open source Python projects like WordPress and Joomla for the PHP programming language that allow you to build websites without knowing much (or any) PHP. However, there are Python projects like Flask that let you build websites if you know Python.

Python is arguably one of the best languages for beginners to learn because it is well designed and much of what you learn can easily translate to other languages. You can play with Python and never go beyond a few basic commands and ideas. Or you can learn how to build full blown applications. And you can leverage what you know about Python to learn Ruby, JavaScript, Java, and other languages.

This dual quality of Python — lots of fun and easy to use yet serious and capable — makes it the perfect language for kids to learn. Even better, it’s the perfect language for parents to teach their kids so both learn a little programming together.

No Starch Press has published a book to help parents do exactly that, Teach Your Kids to Code. As their subtitle says, it’s a parent-friendly guide to Python programming. It also happens to be an excellent guide to learn Python if you’re single, elderly, a Martian, and otherwise don’t fit the parent plus child model.

The book begins by making an important point: people shouldn’t learn to code simply to become programmers. Learning how programming languages work, having a little fun making your computer do things, can expose you to how technology works in our daily lives. Learning to code helps people become active consumers, and in many cases, creators of technology, instead of passive consumers of technology.

Once expectations are set, and you have a Python environment set up on your computer, the book dives into a really fun part of Python, the ability to draw all sorts of lines and squares and circles with a few lines of code. The magic is in a library of code called Turtle. Your first line of Python code imports this library into your small application. Then you get to go a little nuts, telling your computer with a few simple lines of code how and where to draw squares, circles, spirals, add color, and more. And all the steps are clearly explained. It’s a fun, easy introduction to Python.

From drawing pictures, the book leads you through math, loops, conditional logic, randomness, and other concepts before launching into fun ways to use Python to create games. For example, the book shows how to use a lesson on creating random choices to code a simple card game. Or you can update the Pong game to use smiley faces. More seriously, you also learn how to retrieve clicks and other user inputs to make games work.

This approach lets you learn Python as little or as much as you want with your kids, or by yourself. If you’re really motivated, you also can learn how to code a number of fun games.

Learn More

Teach Your Kids to Code (No Starch Press)

http://www.nostarch.com/teachkids

Also In The June 2015 Issue

October 2015 Issue: Internet of Things (IoT)

The Internet of Things (IoT) connects dumb devices like refrigerators to the internet and uses software to connect them to our daily lives.

There are many operating systems for internet of things devices, from existing software used to control electronic boards to efforts by Google and Apple.

Disney Infinity 3.0, Rocket League, and Super Mario Maker are three fun video games to consider for the 2015 holiday season

You can learn a little software programming and have lots of fun with any number of coding apps available for your phone or tablet computer.

Operating system software is a key part of all computers. But what are they and how do they work?

Learning how to make kittens with JavaScript is a great way to learn how to use the free Chrome web browser to practice and learn JavaScript.

Working through a book can help parents learn programming with their kids or kids learn on their own.

Board games and card games are some of the best ways to learn about programming. You don't need a computer. Play as a family or group.

These robots also can be programmed to move around rooms, one way for kids to learn programming.

Six women were hired to use their math skills to program the ENIAC computer. They called themselves The First Programmers Club.

Nicky is a Linguistics major who learned coding skills to further her research. She's also finished a PhD, won a few big awards, and co-founded Grok Learning.

Two women created an innovative online service to teach teenage girls how to code by using video.

The new Rust programming language is designed to solve problems with operating systems and fix issues with C and other languages.

Data can become alive and pose questions as well as reveal answers to questions we have.

Links from the bottom of all the articles in this issue, collected in one place for you to print, share, or bookmark.

DRY is an acronym for Don't Repeat Yourself. It's a critical programming concept and skill to learn.

Interesting news stories about computer science, software programming, and technology for August and September 2015.

CoderDojo is a free after school club for kids ages 7-17 where kids, parents, mentors, and others play with technology and learn to code.