Sunday, November 25, 2012

[book review] Python for Kids



I came across a postcard bearing this book's title in OSCON 2012 at the No Starch booth. I remember thinking to myself at the time, "I wonder if this is the book I will use to teach my kids how to program in Python". I also wonder how this book is different from other similar titles, say, "Invent Your Own Computer Games with Python". Both books intend to teach young kids how to program, and both are heavily involved with GUI in order to engage interest. Besides open source vs. costing money, this book has longer chapters that takes longer to read and practice. Important factor to consider if you are teaching a kid to program. 

The biggest difference, however, is that this book teaches 'all' the fundamentals such as functions, class, objects, and some standard libraries, and it is less game-ish (no PyGame). Considering the scope of the topics it tries to teach, I came away very impressed. I thought the author did a great job explaining complex concepts with everyday words. 

In this book, as you would expect from a intro to programming book for kids:  
- list one way to do things without going into details of alternative ways. 
- Lots of analogies for concepts, i.e. "variables are like labels", "think of a string as a collection of letters", "A function is a chunk of code that tells Python to do something", etc. 

I also wonder what is the right age for a kid to start. Since the book starts by doing simple calculation starting in Chapter 2, I'd say the starting age for the book is whenever the kid is comfortable with simple math, mileage may vary. Since the author stated that he has started to program since the age of eight, maybe that is what he had in mind? 

A few notes I took while reading: 

- MacOS X install instruction is a nice touch on using Automator to open up Python IDLE. 
- I would recommend reading this book in a format with color to take advantage of the illustration. 
- Author did away from all of dictionary reference to the concept of map. In my opinion, this might create more problem down the line or when reading documentations. 
- A pretty steep jump from Chapter 3 of built-in variables to Tkinker Turtle GUI program in chapter 4.  
- Suggestion for Chapter 4: remind the young readers to place the IDLE window and Canvas window right next to each other in order to see the turtle move interactively. 
-  Suggestion for Chapter 7: a more detail step process when first introducing the nested loop in a function since that is the first time the loop and function concepts came together. 
- Chapter 1 to 8 covered all the programming concepts, starting chapter 9-12 introduces some of the standard libraries, file I/O, etc. Then move on to GUI with Tkinter.
- Chapter 12 should be executed under Python 3. In Python 2, the 'T' is capitalized where Python 3 the 'T' is lower case (as illustrated in the book). There are other differences that differs between the two versions, I think. 
- Starting from Chapter 13 there are examples of game projects, create from start to finish. 

I would recommend this book for anybody wanting to learn Python programming. 


12 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Well Well look who I found! I ordered this today for my kids, I figure it's about time for them to start learning some marketable skills. Good to find you Eric!

    Paul Van Lierop

    ReplyDelete
    Replies
    1. Howdy Paul (or unknown), good to see you as well. This was an excellent book. In case you missed the other post on RaspPi, highly recommended Raspberry Pi (the Pi is short for Python, http://www.newark.com/jsp/bespoke/bespoke7.jsp?bespokepage=newark/en_US/landing/raspberry-pi/rasp-pi-accessories.jsp&ICID=HP-Raspberrypi-Accessories) as a $35 computer for kids to play with. It includes Scratch, featured in this code.org video (https://www.youtube.com/watch?feature=player_embedded&v=nKIu9yen5nc), and this book includes many examples.

      Stop by the office some time for coffee or lunch and catch up. :)

      Delete
    2. I will hit you up for a lunch for sure!

      I've been looking at building a Raspberry Pi setup using Xbee and remote Arduino's to monitor the chicken coop, goat pen, workshop and general house automation but I haven't got there yet. I got them started with Scratch last week and they were stoked so there's definitely an appetite.

      Delete
    3. Yeah, I hear you, too many projects too little time. since RaPi has GPIO pins build in, you can possibly bypass the arduino and xbee to speed up the project. You input sensor and output control can both connect to the Pi, and all you need is a shield to protect the RaPi board from weather elements or dust. Just a thought there, will be interested to hear more about it. :)

      Delete
  3. Hi Eric.

    I've read your reviews on Python for Kids and Think Python. And I like them both!

    I'm a CCNA, and my programming experience is pretty non-existent (except for the tiny script here and there) unfortunately. Basically because I haven't really needed it very much, but now I just wanna learn Python to hopefully make life a little easier in the office. :-)


    Which of the books would you suggest to start out with? Or do you have another suggestion? I'm very interested in your opinion.

    cheers,

    Joe.

    ReplyDelete
    Replies
    1. Hi Joe, thank you for reading the review and the kind words. :)

      They are both excellent books, but if I had to pick, I would probably go with 'Think Python'. Here are the reasons:

      1. Think Python is free so you dont even have to spend a dime to get started, http://www.greenteapress.com/thinkpython/. The price tag is not an indication of value but how an idealist Prof. Downey is.
      2. There is almost a community behind 'Think Python', check out the page where it links to an online interactive version, a french translation, etc.
      3. It is the choice of many University level intro to programming class, http://www.cs.cornell.edu/courses/cs1110/2012fa/ and University of Washington Extension Python certificate. I mean, who would argue against professors at Cornell? :)

      Another excellent free resource is Zed Shaw's 'Learn Python the Hard Way', http://learnpythonthehardway.org/. You can choose to read the book first, then if you still need more assistance, pay the $29 for the video and some tutorial.

      Just on a side note, coding is hard and frustrating, no doubt. I have been convinced for years that I need to learn how to script but gave up many, many times. At the time Perl is the dominate language that all of my colleagues were using and it almost seemed like magic on what they can do. So I tried really hard to learn Perl, but my brain is just not wired the way Larry Wall intended to be. So I was frustrated and gave up, picked up again, only to give up once more. I felt I let myself down in the process. I also gave myself plenty of excuses, like I will need to focus on getting CCIE first (which I eventually did), my company has plenty of script ninjas, etc. But the reality brings me back to the scripting/programming front over and over again. So I finally just buckled down and get thru the hurdles, bump my head against the wall plenty of time, and feel the 'I finally did it' feeling when I wrote my first useful script that is worth a darn.

      So keep at it, keep your eyes on the prize, take a break and come back to it if you have to. The payoff is great, I once talked to a Google Network Engineer and she told me she felt Python is what set her apart from the rest of the crowd. I feel the same way.

      Happy coding.

      Delete
    2. Wow, thought I was reading about myself there for a moment! Really glad you got through it. I guess the problem I have always had is getting into the right mindset for programming - the same problem as you perl problem I assume. And because it haven't been really critical to learn, I've always put it aside/quit.

      I'm already reading the Think Python, but having a small crysis in keeping interest because of the same problem. I just wanna get started with the coding, you know? But basics has to be covered, so I will have to keep at it!

      As for http://learnpythonthehardway.org, I don't know if I should get started with it or wait until after, considering it is a Python 2.6/7 version tutorial.

      And as for Python for Kids, I don't mind buying a copy, if it will keep me going! :-)

      Making a game or two, doesn't sound so bad either!

      I'm happy I found your blog. Your story is really inspiring. :)

      Delete
    3. Thanks Joe. Best wishes. Cheers.

      Delete
  4. If you are thinking about teaching extremely young children, perhaps they should spend their childhood playing games and having more fun. My son is twelve years old and a Python user. He spent the summer learning Python with his father. My husband is a professional programmer, but he didn't learn the language until they worked together. He taught my son the fundamentals of programming.
    Local Citations

    ReplyDelete
  5. Python aids children in their scholastic endeavors by improving their comprehension of academic ideas. Through coding, children can learn to deconstruct an issue into manageable chunks and focus on each component separately. They gain critical thinking abilities as a result. My father gave me a programming book that first taught you how to write using Scratch and then used your understanding of Scratch to demonstrate how Python functions. There are plenty of excellent books like it, but I was only able to locate it in German.
    Profile Backlinks

    ReplyDelete