The Practice of Programming

"The Practice of Programming" by Brian Kernighna and Rob Pike (Addison-Wesley Professional Computing Series; ISBN: 0-201-61586-X) is a book whose goal is to make programmers more effective and productive. It does so by teaching good practices and techniques.

The book covers topics such as style, design, interfaces, notation, debugging, testing, performance tuning, and portability. Each of these topics gets its own chapter and is covered pretty throughly.

The writing is generally very interesting though at times it does get a little too much into details. It must have been interesting. I have finished reading it in less than 24 hours after having received it. This is something I've never done with a computer book before!!

The book does live up to its goal. I think any programmer (even with 20 years of experience) who reads this book will gain something from reading it.

Before you think that I think the book is perfect, I will point out some areas where I think it could be improved. First, I think the book is too focused on C. This is not surprising given that Kernighan is one of the authors. Personally, I have always believed that C is a language that encourages bad programming practices. In a few places in the book, I see some of those in the code that is presented. The other area I was disappointed in was that there was not much on object-oriented programming practices. Beyond that, I saw something I do not believe should be in any good OO program. That something was a public instance variable. A few places I disagreed with the authors on style issues. However, all of these problems are fairly minor and will hopefully be corrected in the next edition.

In conclusion, I think this is a book that all programmers should read at least once. I know I will keep my copy on my shelf for those times when I have questions like "how can I optimize this code?". It really is the best general programming book that has been published in years.