on 11 October 2012
I really wanted to be able to write a perfect review for Think Python but I'm afraid I just can't bring myself to do it. Have no doubts about it this is a great little book (little in this case is a relative term - it's 300 pages which isn't generally a lightweight but it's relatively small in the computer language learning arena) which is extremely well written and very easy to get on with. However, for me it's not quite perfect. My issue is as much to do with my programming background as with the book itself. I cut my programming teeth on C - not C++ but proper, old fashioned procedural C - before moving on to PERL and PHP with a brief flirtation with Lisp. For me object oriented languages are relatively new beasts. I've been playing with Python a little bit recently, mainly to use the NLTK package, and I'm aware that I'm just programming by analogy to the languages I already know so I've been writing a sort of procedural Python. I'm sure if I understood the language and object oriented programming better I could get more out of NLTK, hence getting Think Python. However I found the structure of the book was a little bit backwards for my needs in that classes, objects and their related structures weren't formally introduced till chapter 15 and when they were introduced their coverage was a little bit sketchy. I can't help thinking that an earlier and more complete introduction to the object model of programming would be of huge benefit both to those coming to Python from a procedural background and for entirely new programmers who don't have an understanding of the paradigm.
Even with this proviso, Think Python is an excellent book for anyone interesting in learning a new language. It's clearly and concisely written with regular exercises to make sure you understand what you've just read. Each chapter introduces a couple of new concepts which build on previous chapters so you end up with a pretty good understanding of how the language cab be used rather than simply a list of functions and what they do. Just be aware that some of the code you end up writing may make object purists weep though it will still run perfectly well. As it stands Think Python is a solid four stars with a better coverage of object oriented concepts and structures it would easily be a five.
on 5 October 2012
This book actually started out life as a Java programming guide, before being subsequently translated into Python. The overall aim is the same, regardless of language - to get the reader to think like a computer scientist (which incidentally was the book's original title). Downey uses Python as a tool to teach wider programming concepts, rather than simply teaching the use of Python itself.
The book starts out with an explanation of what a program is, covering structure, and going on to cover basic elements such as variables, expressions and functions. These concepts are described at a high level, with examples given in Python but easily understood so that the concept as a whole could be applied in other programming languages.
Chapter 4 provides the book's first case study, and moves the reader on from disparate ideas to an illustration of how the concepts explained in the first three chapters can fit together to form a program. For the purposes of Think Python, Downey has created a package called Swampy, available from the book's companion website. Installation instructions are contained on the website rather than in the book - a clever move to avoid obsolescence in the book, given the numerous and changing systems Python is available for.
A welcome introduction at this point is a program which results in graphical output. So many programming books spend several chapters giving only console output that beginner programmers can feel a sense of not achieving very much. By displaying graphics at this early stage of the book, Downey allows the novice programmer to have some visual reward near to the start of the learning process.
Think Python continues at a steady pace, generally introducing one or two new programming concepts in each chapter - the pace is ideally suited to teaching an introductory programming course, perhaps not a surprise when considering the book's origins as material for the course which Downey taught. Elements such as conditionals, iteration and string handling are taught, always with examples using Python but with a clear explanation of what the element does and not just a set of instructions to copy and paste into Python.
Towards the end of the book, more advanced subjects such as files, classes and objects are introduced through a couple more case studies. Downey is careful not to overwhelm the reader with these more difficult concepts, and spreads the idea of classes over three chapters to ensure a thorough understanding. The final chapter introduces the Tkinter module for producing GUIs, and brings together all of the programming concepts used throughout.
Each chapter ends with a set of exercises for the reader to test their knowledge, solutions to which are hosted on the aforementioned companion website - again, assisting with the book's suitability for course teaching.
Overall, Think Python is a well written book which achieves the author's aim of teaching the concept of programming, using the Python language as a learning aid rather than detailing the specifics of the language itself. I would recommend it for anyone looking for an introductory programming text, or a text on which to base an introductory programming course.
on 24 August 2013
I was looking for an introduction to Python and had considered something with more details of the language structure. I'm a few chapters into this, and it's emphasis is on developing wider programming skills, principles of programming in general, and problem-solving. The exercises are superb for forcing the novice like me to come up with creative solutions. The web support is also excellent. I can see already how the skills learnt will be relevant for programming in other languages. This is exactly what I was looking for, so I'm very pleased. I can see how someone who wants an encyclopaedic guide to Python might be disappointed. But Mr Downey is clearly a skilled educator and deserves great credit as an author.