Practical Programming: An Introduction to Computer Science Using Python

Author: Jennifer Campbell, Paul Gries, Jason Montojo & Greg Wilson
Publisher: Pragmatic Bookshelf, 2009
Pages: 350
ISBN: 978-1934356272
Aimed at: Beginners wanting to use Python
Rating: 3
Pros: Not a bad introduction to programming in Python
Cons: Attempts to make teaching programming into an academic exercise
Reviewed by: Mike James

This is quite a good idea - teach computer science using Python. But the book seems to be more aimed at teaching Python using examples from computer science. It is in fact mostly a complete beginners "how to program" book with a slant towards the academic. One of the problems is that Python isn't exactly the perfect language to illustrate some of the important theoretical concepts. For example you can almost feel the authors' struggle with the idea of data type using Python, which really is about as weakly typed as a language can be - so much easier an idea to get across in a strongly typed language.

From there we move on to almost the practical details of using Python - modules, lists, files - before returning to core topics such as flow of control in the form of decision statements and loops. Structure diagrams are introduced and I can't say that I like them much. The book's presentation of an "if..then..elseif" using two conditionals is frankly disturbing! Equally the structure diagrams for loops involving break and continue look like spaghetti. So much better to first introduce the clean classical structured programming diagrams for a simple if..then..else and the usual range of loops and introduce the more complicated forms as elaborations (to be avoided if possible!)

The second half of the book continues in the same way using computer science ideas to motivate basic programming concepts. The most out of place sections are on searching and sorting - important for computer science but out of sequence for a complete beginner. We then move on to using functions and modules to organize programs but failing to take the opportunity to ram home and motivate the entire modular top down programming approach. From here the topics covered vary widely, perhaps erratically from practical to theoretical concerns - using lists, sets, and dictionaries to organize data, designing algorithms systematically, debugging, creating and querying databases, and building graphical interfaces.

This book seems to be attempting to do too much in too little space. It's not a bad introduction to programming in Python but it could have been so much better if it had dropped the requirement to tackle computer science head on and simply used the principles in the background to motivate and guide the presentation.

Last Updated ( Thursday, 30 July 2009 )