Scratch or Python?

23 Jun, 2013

Marvin writes:

I have a 10 year old son who is interested in programming. He really loves playing games so I thought he should learn how they are created. I am a bit confused on which language to have him start.

My question is should he start with Scratch (and for how long?) or should I start him with the Python language (with your book)? I've also heard about Ruby for Kids. Which is the easier path for him to start.?

I will greatly appreciate you thoughts on how he should get started?

Well, by all means, my book... ツ

But to be entirely honest, it's a difficult question to answer. Some kids will find the visual nature of Scratch attractive. And it may be a natural progression to go from something like Scratch to a more traditional programming language (not something I have a lot of experience with, given I started with a traditional programming language when I was a kid). But, if he has a modicum of technical ability, and an interest in how games are really created, then learning a traditional programming language may be the better path.

Either way, I don't think it will do any harm to start with Scratch, and progress to Python if he finds Scratch a little mundane - or vice versa, start with Python and go back to Scratch if he finds Python too advanced. However, in terms of Ruby, I can't really comment, as it's not a language I have much experience with.

Not sure that particularly helps, but good luck anyway.

Problems installing Python

05 Jun, 2013

Chana writes:

Python does not install on my computer, and I'm not sure why.

Windows 7 Home Premium 64-bit operating system

Everything works fine until you get to the part that says "Please wait while the installer installs python..." After about half an hour, a little window pops up that says that the installer is no longer responding.

According to this page... you should try disabling UAC. I'm not a home Windows user, but a quick google found this: Hopefully that fixes the problem.

O'Reilly Media Discounts

04 Jun, 2013

Apparently Python for Kids is featured in O'Reilly Media's "Learn to Program ebooks" promotion (save 50% on introductory programming ebooks). More details can be found here.

Lander Solution Posted

26 May, 2013

A partial solution to the Lunar Lander 'Programming Puzzle' has just been posted.

One versus two underscores

19 May, 2013

Omer writes:

I am currently on Chapter 13 and I have come across a problem that I cannot seem to figure out. I am in the section 'Creating the Ball Class'. I wrote the code the way that you have described in the book, and I am getting the following error:

Traceback (most recent call last): File "C:/Users/Omer/Desktop/Master Functions/", line 22, in <module> ball = Ball(canvas, 'red') TypeError: object.__new__() takes no parameters

However, when I copied the code from your website, it worked perfectly. I put my code and your code side by side and I cannot seem to figure out where the mistake is. Can you help me figure this out.

It's easy to miss something when you're manually comparing two files. The best way to do this sort of thing is to use a diff tool. You're using Windows, so something like winmerge would do the trick. In any case, when I diff the files you sent using the command line diff tool, I see the following difference:

<     def _init_(self, canvas, color):
>     def __init__(self, canvas, color):

So in your code you've got a single underscore on either side of init - which explains the error you're getting. Because you haven't defined the __init__ function correctly, Python assumes a default with no parameters. Fix that, and the code should work as expected. Good luck!

Addendum (for anyone searching for similar errors): on Windows, you'll probably get a message like "TypeError: Ball() takes no arguments", but ultimately the cause is exactly the same.