Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Learn Python the hard way : a very simple introduction to the terrifyingly beautiful world of computers and code (3rd ed.)
Shaw Z., Addison-Wesley Professional, Upper Saddle River, NJ, 2013. 320 pp. Type: Book (978-0-321884-91-6)
Date Reviewed: Mar 6 2014

The first class in programming is often very difficult, both for students and instructors. Students must learn to do things that run counter to much of what they’ve already learned (reading code is an entirely different process than reading literature, arithmetic in programs sometimes follows rather different rules, and so on). Instructors need to persuade the students to adopt new ways of approaching problems, and new ways to write down what they’re thinking. Autodidacts are faced with a different set of problems, but they’re just as difficult. This book goes a long way toward making the process of first learning to program rather less painful.

First, it focuses on the Python language for examples. Python is a good choice as a first language: it is well suited for use as an interpreter, so program fragments can be evaluated and inspected interactively; the syntax is minimal (though not mainstream); it is concise, so reasonably sized programs can still be quite short; it is simple enough to not require a huge integrated development environment (IDE) (which then introduces the problem of learning the IDE as well as the language); and there are a number of excellent libraries in many different domains available. It also runs on all major operating systems, with a relatively easy installation.

The book covers Python 2.7 exclusively and not the newer Python 3.x series, but the differences at this level are minimal (mostly parentheses in prints).

Second, the author addresses many of the problems that people learning programming often stumble over. Instead of expository text, the book is structured around more than 50 “Exercises,” so the reader is a participant, learning by doing rather than solely by reading and memorizing.

The author emphasizes that students should type in all of the exercises by hand--an ideal way for them to encounter and understand the errors that come from mistyping, misreading identifiers, and goofing up the syntax. Students often find this annoying and a waste of time when they could be copying and pasting the code, but it is by far the best way to learn at the beginner level. Better still, the author provides reassuring “Common Student Questions” that explain just why this and other recommendations are important for learning to program properly.

In a few places, the author suggests that students build flashcards to learn such things as keywords and operators (indeed, a kind of flashcard-type program is given as an exercise, although this could have appeared a few chapters earlier).

The exercises cover all the major Python data structures and usages, so once readers are done with the book, those who have done all the exercises will be reasonably fluent in Python and will likely have a good handle on the programming process more generally. By the end, students will have functioning interactive web pages and the knowledge to build more.

There is also an appendix on the command line for students more used to graphical user interface (GUI) interaction, which covers both Unix shells and Windows PowerShell (which happily work reasonably similarly at this level).

I recommend this book highly for beginning programmers interested in learning Python (there’s also a section on how to learn other languages), and it would be a very good text for a semester (it is a bit long for a single term) introductory programming course for anyone with no programming experience.

There are some relatively minor problems. In one exercise, the author recommends that readers seek out Python code on different websites and try to read and understand it. While doing this can be invaluable, it comes a bit early in the book for most learners, and much of the code so available is less than easy to understand. It might have been better to make a few selected, larger, runnable code samples available using different Python libraries that demonstrate different kinds of programming (Pygame is good for building graphical games and demonstrations; NumPy for those interested in numerical software and so on). This would be very valuable for students more interested in disciplines such as engineering, math, or physics than in building websites.

The list of keywords and operators is given without quick definitions--only the instruction to “look them up”--but short explanations and perhaps a quick skeleton flashcard program at this point could have been very helpful.

The occasional inevitable typographical errors do not detract from what is overall an excellent introduction to programming, and the author does invite readers to inform him if they detect anything that needs correcting.

More reviews about this item: Amazon, Goodreads, I Programmer

Reviewer:  Jeffrey Putnam Review #: CR142067 (1406-0399)
Bookmark and Share
  Reviewer Selected
Featured Reviewer
 
 
Python (D.3.2 ... )
 
 
General (D.1.0 )
 
Would you recommend this review?
yes
no
Other reviews under "Python": Date
Practical Python
Hetland M., APress, LP, 2002.  648, Type: Book (9781590590065)
Mar 28 2003
Python programming: an introduction to computer science
Zelle J., Franklin B, 2003. Type: Book (9781887902991)
Dec 2 2004
Foundations of Python network programming
Goerzen J., APress, LP, Berkeley, CA, 2004.  512, Type: Book (9781590593714)
Dec 26 2004
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy