My first computer language was PL/1, but soon after I learned, among other languages, Basic, and I really liked Basic and I still do. Basic is linear, and I think in linear constructs when I do any kind of computer program. This is probably, in part, because user interfaces are the last thing I want to deal with. I want a series of numbers to be treated in a certain way, or a set of formulas to generate a database. The most non-linear I tend to get is multidimensional arrays, and that’s still linear.
Python is potentially, and in practice, very different, and is essentially used as an object-oriented language. Yet at the same time it can be used in any other way, to reproduce pretty much any sort of programming paradigm. People thought of Basic as not very readable, but in fact, it was in its more advanced form if you programmed right. Python is said to enforce readability, if by readability we mean enforced indentation. People are still free to ruin readability in a number of other ways. But most importantly, Python holds a very important feature in common with Basic: It is interpreted. In other words, at any point in time while you are writing your Python program, you can “run” it and see how it is going.
The biggest difference between a language like Basic even at its high water mark some years ago, and Python is that Phython has plenty of modules for use do do all sorts of cool things. I’m not sure if the Python library is the biggest and vastest and most amazingest of all, but it probably is. So, if you are going to pick a programming language with paradigmatic flexibility, reasonable readability, and a powerful and diverse library of functionality, the Python is probably the way to go.
And therefore, you should teach it to your children. And this is where Python for Kids: A Playful Introduction to Programming by Jason Briggs comes in.
Python for Kids is a lighthearted introduction to the Python programming language, full of fun examples and color illustrations. Jason Briggs begins with the basics of how to install Python and write simple commands. In bite-sized chapters, he explains essential programming concepts. And by the end of the book, kids have built simple games and created cool drawings with Python’s graphics library, Turtle. Each chapter closes with offbeat exercises that challenge the reader to put their newly acquired knowledge to the test.
The first thing that you need to know is this: If your computer has any sort of development environment set up on it, the instructions for installing Python provided in this book may be problematic or at least slightly difficult. I recommend using this book an an installation that is virtualized or simply a different computer than you otherwise develop on, not just so that your kid does not accidentally delete, or worse, alter and publish, your pet projects. Part of the process of modern programming, after all, is learning about the development environment.
There are a handful of good “learn to program in python” books out there and this one is similar; it is hard to know at which point someone using the book will pass from “Oh, I see, that’s easy” to “Huh?” which usually occurs a chapter or two after the person stopped paying attention to details. Python for Kids: A Playful Introduction to Programming does a good job of avoiding this problem by including a complete and rather extensive project, a game called the “Mr Sick Man Game” (which should be read “Mr. Stick-man game” and not “Mr. Stick… Mangame!”) There are plenty of other projects and individual programs that the book guides the reader through prior to the mangum stick opus. The book uses the “Turtle” module, based on LOGO, for much of this work. as well as the tkinter TH GUI toolkit interface. So if you don’t want your children near those modules, look for a different book, just in case you are involved in some sort of emacs-vim style code war.
Python for Kids is not available at this time but will be shipped in December, so this is a viable stocking stuffer option.
ADDDED: Have a look at this post on teaching your kid math using programming, via Python.