How Programmers Teach Their Children To Code
On the one hand, here are collected short and almost step-by-step guides for teaching children to program. On the other hand, there are ordinary life stories about the relationship between children and parents, reflections on the peculiarities of children’s perception of the world. While we are in a coronavirus pandemic, we can still celebrate National Son Day in our home while teaching our children basic programming ideas.
Start with the elementary
When my son Sai was four years old, we already started using programs for creating logos on the iPad (Mad Logo) and making animations using the Scratch programming language for children. But I wanted my son to look inside and came up with some tricks that could captivate him with programming in Python. This language is simple enough for a child to understand and yet powerful enough to implement all the ideas that come to my mind and for which I am paid a good salary.
Switch to Python
Do you know that Python is already installed on your MacBook? You just need to open a terminal window and enter python to run (you need to press ctrl + d to exit). Everything you need to get up and running with Python is in this tutorial.
Talk to your computer
In order for the child to pay attention, I have a special life hack. Make your computer talk! If you have a MacBook, then just open a terminal window and enter the command “welcome”. The computer will answer “hello”. Isn’t it magic?
Everything else you can easily find on the Internet
Imagine that you want to teach your child something difficult. Let’s say recursion. Remember what it is? I remembered, but damn it, I was very interested – how can I explain something really difficult to a child (such as recursion)? I used an excellent one from Khan Academy that talks about a recursive factorial program in an accessible way. Here is the code we used with my son. He was 6 years old then and I think he was too young to understand recursion, but he really enjoyed watching a computer do really big factorials. I’m sure there are 6-year-olds who have already made millions of dollars from an iPhone game they wrote themselves. But my children did not start writing their own programs. In fact, I’m not even sure if they are interested in programming! However, thanks to these exercises, my son Sai became interested in factorials and, most importantly, saw that programming is something that absolutely everyone can do. I advise you Code.org – there is a lot of materials for effective learning to program.
Starting from scratch
Scratch is very fun and intuitive. And this platform is just like that very Lego. My son has been actively using it for more than two years and even now sometimes looks there.
Moving from the warm and cozy world of visual programming to the harsh and cold world of regular command-line text input (and the following error messages) is a big and important moment.