Book review: Think Like a Programmer
I 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.




7 Comments
Thanks for taking the time to post this review. I’d seen this book and thought it looked interesting, but a slight diversion from my core professional development path. As someone with a young family I don’t have a great deal of free time so I try to make sure my reading is quite focussed – and this review means I’ll read the first chapter immediately and the rest maybe later. Thanks again.
Gwyn on October 19th, 2012 at 12:33 pm
Hi,
As your were describing the book (chapter 1), I was getting interested in reading the book.
But as you get to the other part and mentioned about c++ and dependant on a specific language, unfortunately it changed my mind.
But as you described it worth preparing and reading the at least first chapter of the book.
Hossein Baghayi on October 19th, 2012 at 1:02 pm
Thanks for sharing your thoughts. It’s really a shame the book is that disappointing. If the author really had to enter on Programming he should have used some easier-to-begin-with language like JavaScript or Python.
Rodrigo Alves Vieira on October 19th, 2012 at 3:58 pm
I totally share your opinion. I was fascinated and enthusiastic at the very first chapter. I tried to solve the puzzles and wanted to go deeper in the materia. But then I realized that the problems were not as complicated to solve. I also think this book is more for C++ related problems.
simpleMED on October 20th, 2012 at 4:03 am
Maybe this is the book you were looking for: http://www.codersatwork.com/
It consists of interviews with some veteran programmers and has been so far the most interesting programming book I’ve read. It is really interesting to read how these people approach problems and what kinds of things they value in programming.
Main lessons from the book that I’ve been trying to apply in practice are how to solve problems with well modeled data and how to write more readable code. It seems to me that to model data well one needs to really know what the problem is and to produce readable code one needs to know how to write intelligible text.
There’s also a lot of stuff about language design and about problems arising from concurrency that I cannot apply in practice currently but seem like they might contain useful pointers.
Seppo on October 20th, 2012 at 5:13 pm
Thanks for the review!
Alex Lawrence on October 23rd, 2012 at 2:31 am
I think this book would go great with Don’t Make Me Think by Steve Krug. Just to throw in a little from the design side.
Ryan Bradley on October 25th, 2012 at 8:58 am
Comments are automatically closed after 14 days.