Dive Into PYTHON

Dive Into PYTHON
Authors
mark pilgrim
ISBN
1441413022
Published
20 Mar 2009
Purchase online
amazon.com

Dive Into Python is a Python book for experienced programmers. Whether you're an experienced programmer looking to get into Python or grizzled Python veteran who remembers the days when you had to import the string module, Dive Into Python is your 'desert island' Python book. If you've never programmed before, Python is an excellent language to learn modern programming techniques. But this book should not be your starting point.

Page 2 of 2
  1. Editorial Reviews
  2. Customer Reviews

Customer Reviews

spamproof3 said
If you have a Kindle I strongly suggest you avoid this book. The formatting of regular text is quite readable, but the code samples are extremely difficult (or impossible) to read.

At it's worst, the code block at the beginning of chapter 5 is completely unreadable without a magnifying glass, and I have 20/20 vision!

Amazon has some work to do with monospaced fonts in programming books and until those are worked out, I would strongly suggest anyone considering this book hold off on purchasing.

said
First off, I bought this book because I like having books as physical references over reading something on the computer, as it is available online for free.

My background:
Aerospace Engineer, one single class in C++ programming, but currently out in the "real world" doing other work. I've taken up learning Python as a hobby because it's much more productive than C++ for fooling around. I've made plenty of Matlab, C++, and a few Java programs for things as various as finite element calculations and simple asci games. I wanted to learn a language that was easier to use for graphics and general computer tasks than any of the above mentioned languages, so I went for Python. I wanted to spend time in Lisp, but I was disappointed with the available software. Right now I'm using a Python (x,y) install and the Eclipse IDE.

This book is organized in very manageable chunks (chapters), which probably take an hour or two to read, understand, and program up. It is far easier to read than the other programming book I have used, which was Savitch's absolute c++. Having been through some programming before, I don't find the concepts in this book too difficult to grasp, as I already understood the idea of pointers. Others (new programmers) that are unaware of what pointers are may be confused by some of the concepts in this book. I can honestly say that if you do not understand what pointers/addresses are in computer languages to hold off on this book until you know a little more. I was able to make sure the IDE was configured properly and that it was looking for files in the right place because I've dealt with IDEs and compilers before and can generally stumble my way through getting them to cooperate. Someone new to programming might get hung up on things like this and get frustrated, as this book expects you to already be able to wrangle the necessary tools and just program.

This book teaches by example, and expects you to follow along. The only downside of this is it's not quite as good as a reference as it would have been if it was more thorough, but plenty of help can be found online about Python. Another minor issue is the author doesn't necessarily announce when he is providing an example with an imaginary module, so when you try to run the hypothetical example the interpreter doesn't recognize the module you are trying to import.

I love how this book jumps right into business, and I am very impressed with the way that it immediately gets into the power and capabilities of the language. He doesn't beat the concepts to death, but expects you to actually take the time to understand what is going on without an excessive amount of "let me repeat this 10 times because you're stooopid" and handholding.

I highly recommend that if you want to get into Python right away to grab this book, install Eclipse by itself or a distribution like Python(x,y) for scientific/engineering tasks, and start plugging away.

mshepard9 said
I have experience with Fortran, some C/C++, but mostly IDL, a commercial scripting language for scientific visualization. I'm interested in Python because its an open source scripting language.

At the very least, skim the free online version before buying it. I got a copy from a friend and found it tough going. The first chapter 'dives' right into dictionaries and I didn't find it clear at all. Didn't make it past the first 2 or 3 chapters before looking for something else. The visual layout could also be better.

dukeeknightz said
This book should have been called "Wade Into the Shallow End of Python." Virtually every section is punctuated by a statement to the effect of "I don't really understand how this crazy stuff works, either, so here's some other books you can read instead of this one if you want to learn anything" and it's probably the best advice the author has to offer. Numerous features of the language are glanced over or even omitted entirely just so we can enjoy three chapters worth of pointless RSS feed parsing examples and repeated exposure to a textual rendering of the author's extensive collection of obscure techno music. Rudimentary features of regular expressions are also over-explained ad infinitum despite the fact that this book is meant to target developers with experience in other programming languages. If they really needed to pad the content that much then why not cover things like metaclasses or the new generator features or pretty much anything useful?

It gets an extra star simply because it contains no painful-to-read Monty Python references which stopped being funny around 1985; something the official documentation cannot claim.

said
Pros:
1) The book does what the title promises - dives head in.
2) It introduces relatively wide range of topics in a readable manner.
3) Uses reasonably sized code examples
4) The writing is pretty clear and understandable
5) Has practical tidbits occasionally comparing similar functionality against C, C++, Java and Perl. Nice.
6) Provides links to further reading on a topic. Also very nice.

Cons:
1) Most topic discussions are a bit shallow and incomplete. For example it would be nice to present the reader with a comprehensive list of 'stuff' that may be done with a list, string, tuple, etc.
2) While there is a chapter on optimization, Mark doesn't mention the python profiler. I could live with that but there is no mentioning of python debugger (pdb) and there is nothing in the book about logging, either. These should not be considered 'advanced topics' and left out as they are helpful tool in learning any language (my opinion).
3) The book examples follow the 'Look at this cool yet obfuscated stuff I can do with Python - and oh, BTW, this is what it really means' methodology. While the follow-up discussions are reasonable, I would much more appreciate an explanation or at least mentioning of a concept before I get hit by a semi-cryptic line of code. On the other hand, the code is well annotated.
4) Mark uses repetitive examples to illustrate a point. 'This is how to do something', followed by 'This is how to do it better', followed by 'This is how to do it really well'. While illustrative of potential pitfalls, bugs or code deficiencies, this kind of writing makes it impractical to use the book as a reference. Open the book at the wrong page and follow the less than perfect example. Not a good thing. And boring - if I wanted to see it done the wrong way I'd use perl ;-).
5) Mark's statement that C++ virtual methods: 'confuse the hell out of me' (pg. 84) is rather amusing. I'd suggest to skip the amusement as it doesn't give a casual reader a whole lot of confidence in author's understanding of method overloading. Humor me some other ways.
However, this book is about Python, not C++, so I don't hold it against the author :)

In conclusion:
Quite reasonable book for the money, gets you a pretty good jumpstart. Coming from C/C++ background, general programming concepts are not totally lost on me and there are enough practical differences between Python and C++ that this book was worth the read.

The chapters on HTML, XML and SOAP were the primary reason I bought this book. Again, while not covered in depth, I got enough from them to get started with a small practical application.

If you're serious about developing any kind of meaningful code this is a reasonable start but you'll need to dig deeper.

I recently opted for buying Wesley Chun's Core Python Programming (2nd Edition) (Core Series) as it covers more topics in greater depth (it's the details that matter a lot) in quite comprehensive manner while still very understandable by a novice programmer.

O'Reilley's Python Cookbook by Alex Martelli et. al is also a very good complementary reading exposing quite imaginative ways of using even some very basic capabilities of Python.

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Brevity is the soul of wit” - Shakespeare