Head First Programming

Author: David Griffiths & Paul Barry
Publisher: O'Reilly
Pages: 448
ISBN: 978-0596802370
Aimed at: Complete beginners
Rating: 3.5
Pros: Very slow, steady presentation
Cons: Introduces objects quite late, based on Python 3
Reviewed by: Ian Elliot

Head First Programming attempts to teach programming from first principles and it mostly works!

 

 

Author: David Griffiths & Paul Barry
Publisher: O'Reilly
Pages: 448
ISBN: 978-0596802370
Aimed at: Complete beginners
Rating: 3,5
Pros: Very slow, steady presentation
Cons: Introduces objects quite late, based on Python 3
Reviewed by: Ian Elliot

If you know the Head First format you will know what to expect - lots of photo, asides. questions, thought bubbles and a generally lively approach to whatever subject is being covered. If you have read a Head First book before then you might even recognise the photos and many of the jokes just recast to the new subject. This probably doesn't matter because if you are new to programming then the chances are you haven't encountered Head First books before.

The approach is initially very slow and there is a forgivable reaction when evaluating the book's suitability for beginners which is "if you need it this dumb and this slow you probably aren't ever going to make a programmer". 

Even so there can't be a programmer out there who's heart doesn't leap when reading such lines as:

 "Writing programs gives you the power to control your PC"

 "Do you want to be programmed or be the programmer?"

 "Learning to program puts you in charge."

 "Learning to program gives you the power to create and solve."

Any programmer will tell you that the skill is mind expanding, great fun .... and occasionally useful. It's nice to see it in print.

Stripping away the gimmicks the book does take a fairly solid approach to teaching programming. It concentrates on the flow of control idea using the familiar metaphor of building a train track and in this the illustrations help - even if they sometimes seem a little over elaborate.

One small problem is the tendency to present and use ideas before they have been explained. For example, right at the start the reader is asked to comment on a Python program's meaning even though not a single line of Python has been introduced. In most cases this seems to be a fair attempt at getting the reader to think before the ideas are explained, but if you don't like this sort of technique you might not like the book.

The approach is also based on using Python 3 which is an "interesting" choice in that many of the aspects of Python programming are glossed over in favour of a more traditional approach. This isn't necessarily a bad thing as the skills being taught are more likely to generalise in this way. Despite a brief mention of the origins of the name "Python" and much else about the language, i.e. Monty Python's Flying Circus, no real use is made of the opportunity for humour.  Given the style of the Head First books this is something of a shame and only emphasises the fact that they are more than a little stereo typed.

Even though the book doesn't use Python style is has to use Python technologies as soon as it gets even a little bit away from the very basics and faces the problem is that not many useful Python libraries are available for Python 3 just yet. By Chapter Six we have covered the usual ground that might be called structured modular programming - control statements, data, arrays, functions and modules. At Chapter Seven things move on to wider concerns and we find out how to build a user interface using pygame and tkinter and how to deal with exceptions along the way.

The idea of a GUI and the graphical objects are an ideal way to introduce object-oriented programming and indeed this is the subject of Chapter Ten. You could argue that a better plan would have been to introduce objects sooner and using a some sort of drag-and-drop designer - a generally much better way to create a user interface, especially so for the beginner - but this would have involved basing the book on some other technology.

If you are (or know) a complete beginner then this book might just work for you (them). It is slow and gentle enough at first not to frighten the reader. After studying it the reader should be able to program using Python and might well go on to become a Python expert. Changing to another language and a different way of doing things might be a challenge but no where near as challenging as taking the first steps.

Last Updated ( Sunday, 21 February 2010 )