Learn Python The Hard Way: A Review

Published on:
Feb. 1, 2017

If you're reading this , then either you want to read what I think about Zed Shaw's Learn Python The Hard Way or you came here from somewhere I posted this link because you like me or were just curious. Either way, I'm glad you're here.

I worked through Learn Python The Hard Way (LPTHW) in July/August 2016 at the recommendation of a good friend who's a professional (ie: real) programmer. It's marketed as a tool for the complete beginner. That was definitely me. I was also intrigued by Zed's enthusiasm for teaching coding by rote.

While you are studying programming, I'm studying how to play guitar. I practice it every day for at least two hours a day. I play scales, chords, and arpeggios for an hour and then learn music theory, ear training, songs, and anything else I can. Some days I study guitar and music for eight hours because I feel like it and it's fun. To me repetitive practice is natural and just how to learn something. I know that to get good at anything you have to practice every day, even if I suck that day (which is often) or it's difficult. Keep trying and eventually it'll be easier and fun.

Here's the breakdown:

THE GOOD


LPTHW assumes very little prior knowledge. If you've been turned off by programming tutorials or books by people assuming you know something before you start, this is the book for you. LPTHW even includes an appendix that walks you through the basics of how to use a text terminal. I definitely needed that, and the exercises included helped practice skills I use every day now.

Another thing LPTHW does really well is drill you on the basics. After the first half of this book, it's really unlikely I'll ever mess up something in Python because of syntax errors or spacing problems. Part of this drilling is Zed recommends using just a basic text editor. If you've never used an IDE, then you won't miss anything. If you have, not having auto-complete or auto-spacing really makes you pay attention to little syntactical things. Getting into these habits early has saved me a lot of time over the last few months.

The book also covers a surprising breadth of topics. In only 52 single page exercises you'll go through everything from terminal commands to basic Object-Oriented concepts and web development. In the end you even get to put them into practice by making a text-based game and getting it into a browser. (FULL DISCLOSURE: I stopped at exercise 46 and only finished so I could write this review. More on that later)

THE BAD


I'll say this up front: Zed Shaw's writing style is pretty didactic. I read some reviews before I started, and almost all of them mention this. It wasn't a deal-breaker for me because it didn't stop me from learning, but if that sort of thing annoys you this may not be the book for you.

LPTHW also seemed to have a bit of a pacing problem. There were over 30 exercises of just basic syntax and looping constructs before you used your first data structure. After 8 exercises that covered while loops, lists, and dictionaries, you were thrown into Object-Oriented Programming. After only 3 exercises demonstrating classes, inheritance, and modules you were expected to copy verbatim a class-based text game he wrote and understand what was going on. I was totally lost.

After a few more exercises that consisted mostly of me getting error messages about calling functions I didn't think I had called, I figured there was something this book had left out. I left it behind and started looking in other places. After a few doing Harvard's CS50 I came back to make sure I didn't miss anything. The experience I gained in CS50 helped me see where I had fallen off the rails in LPTHW. I think Zed, in an attempt to make the book as accessibe as possible, glossed over some important details of how the programs worked under the hood. While this really helped at first get through concepts quickly, it led to an inevitable wall of difficulty where I just didn't understand enough to figure out what I was doing wrong.

BOTTOM LINE


Even though that Bad section may look longer than the Good section, I'd still rate my experience with the book as positive. LPTHW gave me a great foundation in reading and writing code that has helped me digest further material. As Zed says in the preface:

I like to tell people that my book gives you your "programming black belt." What this means is that you know the basics well enough to now start learning programming.

I think his book did exactly that. Overall 7/10.