Think Like a ProgrammerI was excited to get a copy of Think Like a Programmer for review. The subtitle is, “an introduction to creative problem solving,” which is something that I think is very important to being a good software engineer. I’ve talked a lot to younger engineers about thinking critically to solve problems and not just relying on prescribed solutions all the time. I was truly hoping that this book would be one I could recommend to software engineers looking to take the next step.

The first chapter talks about problem-solving strategies and is pure gold. It talks about classic puzzles that were made famous as interview questions at places like Microsoft and Google. There are a bunch of interesting problems to look at, and a great discussion of how to solve the problems. The author gives a lot of great advice on how to solve difficult problems which break down to always having a plan, restating the problem until it makes sense, dividing the problem into smaller problems, starting with what you know, reducing the problem to a simpler problem first, looking for analogies, and experimenting to see how close you are getting. This first chapter needs to be read by anyone who wants to improve their problem-solving skills. I’ve never seen the process of problem-solving broken down so well as I did in this chapter. It really made me look forward to the rest of the book.

Unfortunately, the book very quickly turned into an introductory programming book. Chapter 2 jumps right in with C++ examples and the rest of the book is pretty much about solving simple problems in C++. Unfortunately, because C++ is quite a unique language, a lot of the lessons learned aren’t directly applicable in other, higher-level languages. After chapter 1, this book basically becomes another introduction to programming book focused on C++. The sort of problems focused on are the kinds of problems you would look at in a computer science course.

I found the dramatic change from chapter 1 to the rest of the chapters frustrating, because chapter 1 was truly unique and not at all language-specific. I was hoping this book would be about problem solving, a guide for non-programmers as well as programmers, and what I found was a chapter on problem solving and the book on learning the basics of C++. That’s not to say that it doesn’t give a good job teaching things like how to use pointers and why linked lists are useful, but for somebody who has already been in the industry and already graduated from a computer science program, these are really just reviews the fundamentals and not all that interesting.

So, if you didn’t take C++ in high school or college and want exposure to some basic constructs and approaches, then you are a good candidate for this book. Anyone with even a little bit of experience will probably not get much out of this book past chapter 1. It’s unfortunate, because I think the author really hit on a great topic in that first chapter and I would’ve loved an entire book that delves more deeply into the problem-solving process.

Disclaimer: Any viewpoints and opinions expressed in this article are those of Nicholas C. Zakas and do not, in any way, reflect those of my employer, my colleagues, Wrox Publishing, O'Reilly Publishing, or anyone else. I speak only for myself, not for them.

Both comments and pings are currently closed.