
The joy of programming revolves around how you can solve a specific problem in a creative way—a way that no one may have thought of before. In Programming Pearls, by Jon Bentley, some of these problems and solutions are described.
This review covers Programming Pearls by Jon Bentley. Programming Pearls is a classic computer book.
Programming Pearls is very well organized into the problem and solution format. It teaches us that all programming tasks can essentially be thought of as problems and our creativity can lead us to the best solution. In the solutions, we go through a process where the best path is narrowed down.
Yes—but it is still fascinating and informative. A lot of the problems are not things that current programmers will ever encounter. However, the framework of determining a solution to a problem is still useful, and this is where Programming Pearls shines. It helps us learn how to derive solutions in an iterative and creative way.
For example, one of the earlier examples in the book is about how to sort ten million integers. The methods used to solve this problem (through bitmap sorting) are fascinating. However, the problem only exists because the computer would only have one megabyte of free memory! These days, you will rarely find a computer that will only have one megabyte free. The problem is obsolete; the problem-solving method is timeless.

I really enjoyed the chapters in Programming Pearls on optimization, both for speed and space. The relevant columns are 9—Code Tuning and 10—Squeezing Space. In column 9, the extreme optimization of the binary search algorithm is amazing. Again, though, this example does not really have much application in today's world where managed languages dominate.
In column 9, we are taught about the tradeoffs in many optimizations, particularly those related to space. This discussion was valuable for helping me understand the deep layers of complexity involved in decision-making for programmers. Programming can become as complex as you want it to be.
I won't deny it: I enjoyed Programming Pearls and thought it was a worthwhile read. However, I didn't find it of much immediate benefit to my own programming skills. I think it must be appreciated for the methodologies of craftsmanship it reveals; in this context it is an essential book for your shelf.
Books About Programming