Learn Python the Hard Way; what an intriguing title, right? That’s what I thought, at least. Well, who wants to learn something the hard way? That sounds painful. Why do something the hard way when you could do it an easier way?
The truth of the matter, of course, is that the distinction between easy and hard here is entirely superficial and relative. If you’ve never so much as looked at a line of code in your life, anything involving coding is going to be hard, right? And if you’ve been programming for 30 years, I doubt you would suddenly be faced with the same challenge as a beginner just by taking on a new language.
In reality, this title has a similar effect to telling someone who is trying to break into the music industry “don’t do it.” It will either dissuade the hesitant, or inspire the passionate. If so much as a book title puts you off of your course, you are likely not ready for it.
Learning Python the “hard” way describes Zed Shaw’s DIY-styled philosophy. There are sections of the book that simply state “here’s a new concept, look it up,” and sincerely expect you to do so. It implies the self-discipline and motivation needed to undertake something like teaching yourself coding. While this might seem off-putting to the budding Python learner who has just purchased a technical how-to book, there is a wealth of information and discussion to be found on sources like https://www.python.org and Stack Overflow, so a simple Google search and perseverance is all that is needed to find answers.
As for the content itself, Shaw states in the preface to the book that his instruction centers around brief, fundamental exercises which entail a high attention to detail, critical thinking, and an urging to revisit and analyze exercises after they’ve been done to inform your learning. At the time of writing this review, I have completed maybe 60-75% of the book, but this approach is consistent throughout.
For me, I started this book with a beginner’s grasp on basic syntax, logic, and coding practices, having taken a formal logic course in college and dabbling in object-oriented programming over the years, so I didn’t have much trouble with the first half. After that, Shaw begins combining previous concepts like for and while loops with Boolean operators, nesting, and object-oriented concepts, leading to a rapid shift in the density and complexity of individual exercises.
At this point, I began slowing down and taking my time with each exercise, having gone from my practice of completing one exercise per day to one exercise every few days or week. For those less meticulous or more gifted than myself, maybe you will get through it more quickly than I have, but I tend to linger on exercises until I feel I can explain each part of the program to myself well. I also tend towards getting sidetracked down a rabbit hole of forum threads when researching Python concepts, so there’s that, too.
There are some areas of the book that could be improved, even considering Shaw’s no-hand-holding approach. For example, I spent a little too much time dissecting my code in Exercise 39 for mistakes, when eventually I realized the book had mistakenly instructed readers to use regular brackets instead of curly braces for a dictionary. Shaw also outright instructs readers to memorize some sections. A generally acceptable approach for introductory work, but short-sighted for exercises like the chapter introducing Boolean operators. If, after all, you stick with coding, you will need to learn the basics of Boolean logic eventually, so why encourage readers to blitz through the exercises by memorizing combinations? Furthermore, Boolean logic is a skill that pays off in other ways, like learning how to perform more precise Google searches. In many areas, there are some bits of knowledge that simply require rote memorization, but I don’t think this topic is one of them.
My intentions with my own posts about the exercises are to record my experience with each one. While at first it might seem against the spirit of the book, I hope to give a personal take of my time spent with the book rather than give explicit answers to questions posed therein. Half of the fun is digging for them yourself anyway.
Overall, I find the book to be challenging, rewarding, and a good investment of my time. I recommend it for anyone learning Python, beginner, intermediate, or advanced. After I finish all of the exercises, I’ll add a final review of my feelings. 2 out of 5, would read again.