Deitel and Deitel Book...
James T. Dennis
jadestar at idiom.com
Thu Mar 14 20:50:55 EST 2002
More information about the Python-list mailing list
Thu Mar 14 20:50:55 EST 2002
- Previous message (by thread): Deitel and Deitel Book...
- Next message (by thread): Deitel and Deitel Book...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Dean Goodmanson <ponderor at lycos.com> wrote: >> I wonder how much interest there would be in a revival? >> Dinu > YES! > I've found Python to be an excellent learning environment for personal > development in software engineering and computer science. > Especially since the advent of > href="http://www.mindview.net/Books/TIPython" > Bruce Eckel's _Thinking in Python_ > and > http://vig.pearsoned.com/store/product/0,,store-562_banner-0_isbn-0130409561,00.html" > Thomas Christopher's _Python Programming Patterns_ > Best Regards, > Dean Christopher's book has almost nothing to do with "Patterns." While the "patterns" community is somewhat vague about the definition of "design patterns" Christopher employs a definition that's so nebulous as to be completely meaningless? It's sort of like saying "Chair: anything that could be sat upon, and the act of sitting, standing, or being, or anyone that sits, stands or is" (as in the chair of the meeting sat on the lawn, which was her chair). It's sort of like that, except that Mr. Christopher isn't nearly so clear or definitive on the topic of patterns. In a twenty chapter book he devotes one specifically to patterns. He lists twenty patterns that roughly correspond to most of the GoF patterns; but he doesn't ennumerate them so the reader who is familiar with the seminal GoF volume is left to wonder which three GoF design patterns were silently omitted, or to wonder if some were merged in some way. Mr. Christopher doesn't describe alternatives or controversies in the patterns (such as Martelli's "Borg" vs. the GoF "Singleton") However, the worst failing of this book is that it doesn't include cogent code examples. It seems to be floor clippings from scripts or small programs that he's used in his projects. The points under discussion in the running text are not isolated or highlighted in the code listings and the examples have little pedegogical value. One of his examples implements a priority queue by treating a list as a "heap" (his term); his example takes over 50 lines of code and he doesn't clearly show sample usage of this class. After awhile I abandonned my pondering of his code and wrote my own from scratch (as a dictionary of queues with a list of the keys to sort into priority order). I won't argue that mine code was better than his (since I didn't understand his code and I didn't have a clear API to emulate). However my code only took about 25 lines to implement, allowed me to have arbitrary priority designations (integers, reals, letters, anything sequence that was comparable and "sortable") and should have been pretty fast and lightweight (though I didn't rigorously profile it). The API I offered for mine was a superset of what I saw in his, adding items to a queue automatically created new queues as necessary (or could optionally raise an exception if one set an instance flag); empty queues are automatically removed from the dictionary and keylists; call ".next()" (with no specific priority) gets the first item in the "highest priority" queue); "highest priority" could be set at instantiation --- increasing or reverse sort/lexical order; etc. (The point is that his code example was confusing and long; and it would seem to be unnecessarily so if a mere student such as myself can produce something shorter, simpler and with roughly similar functionality. If his example offered some functional advantage that I could not discern, it suggests that it was not a good example or that it lacked supporting exposition in the accompanying text). In short I disliked this book. None of the code examples even approached the claim of "enterprise ready" that was proudly touted on the cover. These were examples of "programming in the small" rather than "in the large." (It did have one saving grace: the chapter or so on threading was clear and concise. I can't assure you that it was either comprehensive or entirely correct --- but it was a very good introduction to concurrency problems and to Python's elegant and simple threading support).
- Previous message (by thread): Deitel and Deitel Book...
- Next message (by thread): Deitel and Deitel Book...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list