I just finished reading “Head First Python” and had great fun doing so.
I Think that this is a great book for the beginning Python developer. But unlike a lot of other books that aim for beginners, good practices aren’t ignored for the sake of simplicity. The practices are explained and used.
The head first series can take some getting used to. Whenever I talk to someone about the head first books I advice them to borrow a copy before buying or take a look at the Google books version of the book. The style just isn’t for everybody. But what I have seen so far is that the style works. The pretty pictures, the repetition and the way context is given continuously make you grock and remember what you read easily.
When you want to think about if the book is for you, the author categorizes the book as follows:
This book is for you if you can answer “yes” to all of these:
- Do you already know how to program in another programming language?
- Do you wish you had the know-how to program Python, add it to your list of tools, and make it do new things?
- Do you prefer actually doing things and applying the stuff you learn over listening to someone in a lecture rattle on for hours on end?
This book is not for you if you can answer “yes” to any of these:
- Are you looking for a reference book to Python, one that covers all the details in excruciating detail?
- Do you already know most of what you need to know to program with Python?
- Would you rather have your toenails pulled out by 15 screaming monkeys than learn something new? Do you believe a Python book should cover everything and if it bores the reader to tears in the process then so much the better?
And I agree to these rules. It’s not a reference book, it isn’t the Python bible. It is hands on and a good start for learning Python. But if you are an experienced developer be prepared for a quick read. I read it in three evenings and sometimes things where explained that shouldn’t be explained to someone who already knows how to program in another programming language. But that is a thin line.
The book is pretty broad. a sample of the topics:
- Python syntax
- Setting up your environment
- Sharing code with PyPi
- Data manipulation
- File handling
- Web development
- Mobile development with an android
- Building scalable apps with Google App Engine
Many books for beginners leave out good practices because it might confuse the reader and take their mind of the things the book is trying to teach. “Head first Python” is a welcome change to this. As an example I loved quotes like these:
As a general rule, Python programmers look for ways to reduce the amount of code they need to write and worry about, which leads to better code robustness, fewer errors, and a good night’s sleep.
And on page 31:
Recursion to the rescue!
The use of a recursive function has allowed you to reduce 14 lines of messy,
hard-to-understand, brain-hurting code into a six-line function. Unlike the
earlier code that needs to be amended to support additional nested lists
(should the movie buff require them), the recursive function does not need to
change to process any depth of nested lists properly.
This review is done as part of the O’Reilly Blogger Review Program. O’Reilly provided the book but does not make any judgment on the content of the review.