75 of 93 people found the following review helpful:
1.0 out of 5 stars
A Recipe for Disaster, September 28, 2003
This review is from: Python How to Program, 1/e (Paperback)
Previously, I reviewed the "Java How to Program" book and found it to be a terrible waste, sure to take all the fun and creativity out of programming. So when I saw this book on the shelf, I flipped through it, hoping that the free-wheeling nature of Python might have lead the Deitels towards a more enlightened approach to instruction. I quickly found that this book has many lessons to teach (although few that I would agree with). For example:
* Python programmers are NOT having more fun than Java (or other) programmers; all languages are equally stultifying.
* Learning a language is a tedious task, centered around learning features of the syntax in a prescribed order. (This is like learning to cook by trying ingredients one at a time in alphabetical order, without ever trying to put together something tasty.)
* The practice of programming has no underlying principles, only an endless series of tips presented in overly-garish multicolor pages. (You'd be better off with a single chapter of "Structure and Interpretation of Computer Programs" than with anything in this book.)
* Programming is inherently boring, involving endless repetitive typing; it is better for the programmer to do a lot of work than to expect the computer to. For example, consider this example from chapter 4 (Fig 4.7):
===================================
import random
frequency1 = 0
frequency2 = 0
frequency3 = 0
frequency4 = 0
frequency5 = 0
frequency6 = 0
for roll in range( 1, 6001 ): # 6000 die rolls
___face = random.randrange( 1, 7 )
___if face == 1: # frequency counted
______frequency1 += 1
___elif face == 2:
______frequency2 += 1
___elif face == 3:
______frequency3 += 1
___elif face == 4:
______frequency4 += 1
___elif face == 5:
______frequency5 += 1
___elif face == 6:
______frequency6 += 1
___else: # simple error handling
______print "should never get here!"
print "Face %13s" % "Frequency"
print " 1 %13d" % frequency1
print " 2 %13d" % frequency2
print " 3 %13d" % frequency3
print " 4 %13d" % frequency4
print " 5 %13d" % frequency5
print " 6 %13d" % frequency6
===================================
(Note I use "_" for blank because Amazon won't indent code properly.) This is 30 lines (42 if you count the copyright notice) for something that a grade-schooler could tell you (I know -- I asked one) is better done with 7 lines:
import random
def roll(n, sides=6):
____freq = [0] * sides
____for roll in range(n):
________freq[random.randrange(sides)] += 1
____return freq
print roll(6000)
I find it a case of unconscionable student-abuse to present examples like this, but I suppose the Deitels had their reasons: perhaps they hadn't introduced lists (or functions) yet. Perhaps lists (or functions) didn't fit readily into their idea of the right order to learn concepts in BASIC (which must therefore be the best order to learn concepts in every other language).
If you want to learn Python, or learn to Program with Python as your first language, try another book such as "Learning Python" or "Programming Python".
If you want to ensure that you won't appreciate why Python is the way it is and why it is interesting; if you want to be bored and avoid learning how to do something creative, by all means stick to this book.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
17 of 19 people found the following review helpful:
1.0 out of 5 stars
Disappointment, May 6, 2005
This review is from: Python How to Program, 1/e (Paperback)
I purchased Deitel & Deitel's C++ How to Program book long ago, and found it to be comprehensive and extrordinarily helpful.
When I picked up Python How to Program, I expected the same incredible experience. Instead, I was sorely disappointed by their complete lack of Pythonic thinking. It seems as if they took one of their other How to Program books and ran a code converter across it to migrate it to Python. As a previous reviewer pointed out, some of the examples are horrificly implemented, a clear case of programming in Python with the "C/C++ mentality."
The examples seemed fun, but no amount of fun can compensate for the fact that this book teaches you nothing about how to truely be a Python programmer. Anyone can read the lexical syntax descriptions on the python.org website and code the examples in this book. It gives me the feeling that Harvey Deitel did not learn Python for any reason other than to write an expensive book about it, and has no idea how to actually use the language.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
8 of 9 people found the following review helpful:
4.0 out of 5 stars
really quite good, July 26, 2002
This review is from: Python How to Program, 1/e (Paperback)
I was also a technical reviewer for the book, and really liked it. Even considering the price of the book, I think it's quite valuable, because it explains the basics of so many topics in a manner that makes sense. If you are new to programming and would like to try out different things to see what you might like, such as web programming, XML, designing windows (lowercase 'w') that will work on a variety of platforms, databases, sockets, etc., you may find that this book provides material you would otherwise look through a literal stack of books to find. No programming book is perfect, but I think this one is pretty good.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No