REVIEW - The Practice of Programming

Title:

The Practice of Programming

Author:

Brian W. Kernighan, Rob Pike

ISBN:

9780201615869

Publisher:

Addison-Wesley Professional (1999)

Pages:

267pp

Reviewer:

Chris Hills

Reviewed:

April 2000

Rating:

★★★★★

Whilst much of the book is 'common sense' it is of the kind that only 10% of programmers have after years of working and gallons of coffee

This book reminds me of Koenig's Traps and Pitfalls and it is probably going to be an equally big seller. Whereas Traps and Pitfalls is C language specific this is a more general book on software development. Whilst many of its sections are not language specific it is really a C (and to some extent C++ and Java) developers book. It is useful for both Unix and PC developers. Though the latter may wonder what awk and grep are! Having come from Unix myself I can see its influence on the roots of the book.

Like the other greats (Traps and Pitfalls and The C programming Language) it is a slim book, but worth every penny. There must be something about Bell Labs that encourages good succinct writing! My bookshelf is getting sorter but with better content all the time!

The book feels like the 'User Guide' for software development that should have been issued with the K&R C book. However, as this book clearly has insights drawn from many years of sorting out problems, etc. it could not have been published at that time. Whilst much of the book is 'common sense' it is of the kind that only 10% of programmers have after years of working and gallons of coffee (The other 90% usually think they are the 10%!).

On the down side a book published in 1999 should not be referring to the local (and superseded) ANSI C. There are a couple of points on code layout I could disagree with (having spent most of my time programming with 'mere mortals' who do some very silly things). Also there is no mention of lint or static testing. These are only minor grips on a book that is very good overall.

One thing I like (other authors take note) at the end of each chapter is a book list with a note as to why the book has been included or what value the authors place on it. This is far more useful than a plain list of books.

Whilst it is not written for students it should be one of the first books students buy and by inference lecturers should get it before the students do! It will stop students (I hope) gaining some of the 'interesting' processes they seem to collect. It will also speed things up as learning from some one else's mistakes leaves you more time to do what you should be doing.

If you are not doing embedded C programming (where you should be using the MISRA-C guide) this will be an invaluable book. It is small and the actual text being clear and concise, easy enough to read. At the back is a very useful list of one line 'rules' sub- divided into categories such as style, interfaces testing, etc. It is the sort of book you can dip into time and time again, as the chapters are self-contained. I recommend it to all C programmers.


Book cover image courtesy of Open Library.