By Zed A. Shaw

An Attempt At A Book Teaching Beginner Python

I've had an idea for an introductory book on programming that follows the model of "trainer" books for learning a musical instrument. Most of these books are organized like this:

  1. There's a bunch of exercises.
  2. Each exercise is 1 or 2 pages.
  3. There's only a little bit of prose.
  4. You do each exercise exactly, then move on.

It's a simple concept, with the idea that a big part of music is learning to do things with your instrument, and that's best accomplished by fairly repetitive progressively difficult exercises.

There's a few books that do this for other languages, like the wonderful Little Schemer, Seasoned Scheme, Reasoned Schemer series. I think those books have the right idea, but again I didn't like the format.

Yesterday I finally started what I think might be this book. I'm calling it, "Learn Python The Hard Way" to sort of make fun of Learn Perl The Hard Way which actually is a hard way to learn a language (and pretty fun if you're a programmer). I figured the "hard way" to learn Python would be pretty easy.

This is already in the book, but the point of the book is not really to teach programming directly, but to do it "Karate Kid" style. At the most basic level people starting out need basic skills before they can even begin to understand what they're doing. The book will provide them with exercises they simply type in exactly and modify, whether they understand them or not.

In the spirit of being open and showing people the process not just the results, I'm releasing a quick PDF of the book with a few exercises in it and the general feel:

LearnPythonTheHardWay.pdf

I'm looking for the following from people:

  1. Any prose that reads poorly or doesn't make sense.
  2. Any comments on the approach.
  3. Any ideas for particular exercises of this style you think people need.
  4. Any feedback from people interested in programming who try the book, especially if they don't like it.

The book will be totally free and nobody will be allowed to make money on it. Probably some Creative Commons license. It's written using Sphinx so other Pythonistas can contribute and maintain it.