Dive Into Python Must Die–Zed Shaw
I’ve had it. Dive Into Python is one of the worst books for learning Python and it must die. I’ve had too many potential programmers find this book and get tripped up by its horrible design decisions that I’m declaring war. The book is weird, uses antiquated technology, has horrible examples, and Mark Pilgrim is too much of a neckbeard ass to listen to anyone about it:
09:42 @diveintomark @zedshaw Completely rewrite the first 3 chapters of a book I haven’t touched in 6 years? Yeah, I’ll get right on that.
11:32 @diveintomark @zedshaw you sure do have a lot of opinions. You should start a blog!
This is his response to me saying that he should remove ODBC from his book. Yes, OH DEE BEE CEE. He has a goddamned book that purports to teach people programming that still, in 2010, references a piece of crap technology from the 90’s. Yes, he actually used that technology to teach Python in the beginning of his book six years ago. Even back then that was a stupid fucking decision.
This is just unheard of in the tech book scene. Mark Lutz’s fantastic book Learning Python has been updated 4 times already and tracks the language fairly accurately. Mr. Lutz book is easy to read, teaches the language and not some shit technology even Microsoft won’t touch, and doesn’t assume any particular computer or even that much prior knowledge.
Meanwhile, Mr. Pilgrim’s book hasn’t been updated in 6 years even though it’s fucking online and people can send him patches. That’s right, the dude has the book up there, with the full text on the web where people can send him feedback, and he can’t be bothered to actually update it. Hell if he put the damn source code to the book up people could just fix it for him, but no, he’d rather leave his steaming pile of crap online for free as his only means of competing with the much better Learning Python.
Dive Into Python isn’t just bad because of the use of ODBC, it’s also just full of bad initial examples. Take a look at your first Python program and boggle at all the bizarre stuff a beginner has to suddenly comprehend:
- A function, with a giant doc comment right away.
- Weird underscore variables with a bad font making it look like one underscore.
- A list comprehension for-loop to join a string using a format string off a tuple.
- A dict, formatted with backslash chars that aren’t even needed.
Holy crap, how in the hell is that a good first example? Even worse is it starts a trend within the book of using ODBC as a theme to teach Python.
Beginners see this and think that Python is complex and hard when it’s actually one of the few languages designed to be easy to use. It’s a damn shame they run into this book first.
Even the Dive Into Python 3 book has horrid first examples. Take a look at the first Pythonprogram you write. WTF is that? The first thing you write involves these gems of edification:
- A multi-level dict with lists and strings.
- A function with a huge ass comment making confusing the syntax.
- An exception being thrown right away.
- A ternary style if statement.
- A nested for-loop.
- The “main method” trick with a bad font that makes it look like one underscore instead of double underscores.
This is for a first program? When beginners are told “go read Dive Into Python” they run into examples like this and get discouraged. I could see if Mr. Pilgrim had a giant disclaimer or something warning people that this isn’t a beginner’s book, but he doesn’t. In fact, he has a whole damn chapter on installing Python 3 as if it’s for a beginner.
This book is so full of bad initial examples and difficult to follow instructions that it actually hurts Python to have it exist. When beginners stumble onto it they end up getting discouraged and go on to another language. I personally have had too many friends who are eager to learn programming find this festering dung pile before I could warn them and get turned off from programming.
I’m done with it. Mr. Pilgrim is too insensitive to the needs of the beginner (and hell, the expert too) to actually give a shit about their education. Since he’s unwilling to update the book and fix the obvious problems with it, and since he’s bequeathed this white elephant onto the world for free, the only thing left to do is beg fellow Python programmer to NOT recommend this book.
Do not, whatever you do, tell people to learn from Dive Into Python. You are only driving them away from either the language or programming in general.