I recently spent some time working my way through “Learn Python The Hard Way” by Zed A. Shaw. Zed is a programmer who has accomplished more than most in his short time on Earth. He is outspoken and often edgy, and has a reputation for being both brilliant and blunt. Zed is the creator of the Mongrel server engine that powers many Ruby on Rails sites.
Zed comes off as a Hard Ass, more than anything, and his proposed methodology to learn programming is hard, as in hard assed, not hard as in difficult. Learn Python The Hard Way is old school. Which is good, because I am old. It reminds me of learning Fortran in my freshman year of college in 1980. Hollerith cards. 039 keypunch machines. All batch processing. When you are dealing with “physical” cards, and physical sorting of program steps, and waiting an hour to see if your code compiled, let alone executed to completion or got a correct answer you tend to do alot more “desk checking” than we do today. That is the thing that I like about LPTHW is that it teaches some technique around old school desk checking. Like reading your code backwards to find errors, something that we often did on green bar paper at a table at Helmut’s Alpine Kitchen at two o’clock in the morning with a pot of coffee and an order of biscuits and gravy.
Zed recommends that you use a text editor and not an IDE (in his mind the difference is that you can compile and run your code without leaving the ide) – so that you learn to use the command line to run your code. He starts by having you copy his code verbatim and get it to run, so that you understand how picky the interpreter is about syntax. LPTHW does and excellent job of layering topics, so that it builds up from basic concepts to some rather advanced concepts without overwhelming the learner.
Each lesson has some extra research or exploration or experimentation assigned to go beyond the basic exercise that he walks through. I recently worked with a new programmer who was using this to jump start a possible career change. He made it through in about 8 weeks and didn’t really get confused until he got to the object oriented concepts in lesson 43 or so.
Like any other learning endeavor, I would highly recommend that you seek a mentor or a coach to help you when you get stuck. Sometimes all you need is a sounding board – so that in describing your problem you can see the solutions, other times you may need a hint about other ways to think about the problem that might yield a solution. Having someone experienced or knowledgeable to talk with is always a good idea when learning something new.
The other thing is to adopt the beginner’s mind – don’t assume that you know or understand. Don’t get stuck because of what you have always thought. I think that LPTHW does a pretty good job of forcing you to adopt this mindset.
I also think that Python is a great first language. So if you want to learn code, and you want to dabble in programming, especially if you think that might be a career option for you, pay the money for this book. Find a mentor or coach, and work through the lessons. I pretty much guarantee that you will learn something about programming – even if it is that you don’t like it as much as you thought.