Select Page

OK, I dove into Python again, this time using Zed Shaw’s Learn Python the Hard Way. Before I get too far, a little background on me. Since Zed’s done his best to pen a book for a particular audience, it’s only fair that I disclose a little more about what this particular reader brings to the table.

The Reader (Me!)

I’m a technical writer for software. I try to rotate my reading list between “getting started” programming books, books on design and marketing, and books on technical writing (information architecture, design, etc…).

I first was exposed to programming a long long time ago using Turbo Pascal on DEC Rainbow 100’s running CP/M. Later we migrated to TRS-80’s (I don’t know why we made such a move). Then came a litany of systems from Commodore, Apple II c, IBM PC XT, and then the gamut of Intel-based systems that followed (imagine my surprise when Mac came back!). All of the preceding is a mix of school exposure and home exposure.

As a professional tech writer I started by writing the manual for a Delphi application that was going to be part of a PoS display for Obvious Nutrition Company. The product line and accompanying PoS system never launched (though the manual and software v.1 were both done).

After that, I had a myriad of different projects until I wound up at Compaq working on the guides, manuals, and UA for a telecom application that ran on Tru64 Unix w/ Oracle databases. Since then, my horizons have broadened a bit, but I remain someone with passion enough to do his best to learn something of the technologies in order to better write about them.

In short, I know how to write, “Hello World” in a staggering array of languages. Zed’s tome is not my latest foray into Python, but it’s fair to say that in parlance “I’m a technically apt novice”. In practice this means that I often surprise people as much by the technical things I’m able to do as much as I surprise them by what I can’t. Think, “How on earth can you do X and not know how to do Y?” That’s me.

Enter Zed Shaw and Learn Python the Hard Way…

Front Matter
Read it. It’s fast and it introduces you to the method Zed’s chosen to employ for this book. What’s important is that he’s decided to stress rote memorization and repetition as a means of getting started with Python. Put another way for you tech writers out there, It’s all procedure (Type an exercise verbatim, execute, repeat). There’s little to no reference or concept information to answer the Why or WTF?

The premise, of course, is that such information is not necessary at such novice levels.

One last note here: I’m making a lot of assertions based on what I’ve read so far in the book. I may change and refine these as I work my way through it.

Exercise 0: The Setup

Zed walks the reader getting the system set up across Mac OS X, Windows, and Linux. Essential material for sure, but I was able to skim through it since I was already set up.

I applaud Zed for remembering that this could actually be an extremely difficult task for beginners. While he does a good job walking through things step by step, I know how easy it is for inexperienced users (since I am so often one of them) to get utterly flummoxed by the seemingly obvious. Maybe it would be helpful to link to an “In case you get stuck” resource. This might be a good place to have a note like, “If you get stuck, ask for help on Twitter #LPTHW”?

Of course this means that there would have to be a critical mass of people monitoring it and an easy way to move the conversation from a request for help back to a wiki space or some place more apt for providing assistance…but if people get lost at the beginning, there’s very little in the way of resources to help them get unstuck.

Exercise 1: A Good First Program

> Print “Hello World!” #and more.

It’s back to the basics with Hello World! This lesson is as much a confirmation that you got things set up correctly and that you know how to run a Python script as it is about printing strings. He also spends a few paragraphs explaining how to interpret error messages. Nothing too heavy here.

As far as concerns go, I’d say that my main concern here is the same as I had with the previous exercise. If users are stuck on something here, there’s no place for them to turn. I’m beginning to suspect that I’ll have this concern in the remainder of the book, so I’ll not mention it again unless the situation warrants it.

Exercise 2: Comments and Pound Characters

Basically Zed gently introduces the reader to how comments work in Python. I submitted one ticket for a typo in the book.

Exercise 3: Numbers and Math

Yay! Math (or Maths)! A quick intro into how to perform calculations in Python. We start to mix things up a little with strings, calculated numbers (not sure what to call them at this stage), and even mathematical expressions that evaluate to True or False.

Exercise 4: Variables and Names

Zed introduces variables and the exercise illustrates their use. He does a nice job introducing what a variable is, so I may be forced to revise my earlier comments about his approach having no concept or reference information. Clearly it does have some.

Exercise 5: More Variables and Printing

All about embedding variables in strings. Good information, but here I’m starting to get frustrated with the lack of reference or concept info. You could walk through the exercise with the assumption that %s and %d were just arbitrary choices. It’s only if you look at the extra credit section and read, “Try more format characters. %r is a very useful one…” does the reader get any idea that these ‘format characters’ are special in any way.

Of course it is easy to say that this is precisely the challenge of Zed’s book: That the reader is forced to do some outside research to find out what some of these things mean. Indeed, it’s true. But again, for the novice reader, it can be quite intimidating to find the plain English description of something like this. I think this is where Zed could add tremendous value…either by pointing to the good reference material or by providing it himself. Of course, in so doing, the scope of his book quickly changes from the ambitious to monumental.

Conclusion
First off, Kudos to Zed Shaw. I don’t think enough developers try to write for the novice. I applaud Zed for his effort and the product thereof. My gripes thus far are rather limited:

  • Lack of emergency resources if the reader gets stuck could derail someone at any stage in the game.
  • Lack of reference information and limited conceptual information make it difficult to make the connection between doing and understanding.
  • I could swear that he alternates between “Python” and “python” when referring to the name of the language. AFAIK, “Python” is preferred, as is consistency. (Zed, be sure to throttle me for lazy reading if this is not the case.)

So far the book has been a honeymoon for me. I’m not a good evaluator for these sections because I’ve already been exposed to (almost) everything covered thus far. I expect this situation to change pretty quickly. Let’s see what happens when the honeymoon is over.