cover image for Think Like a ProgrammerExperienced computer science teacher V. Anton Spraul guides the reader in how to “rewire” the brain for problem solving instead of rote typing. As the back cover puts it, “The real challenge of programming isn’t learning a language’s syntax - it’s learning to creatively solve problems…”

The book starts with a general discussion of problem solving, removed from the specifics of programming. It may seem overly familiar to some, but I believe that even experienced problem solvers can find joy in Spraul’s delivery of the universal techniques.

The middle of the book took me back to 200-level college CS courses. I’ll have to be honest that I only skimmed these chapters, as the I’ve been working with arrays, pointers, recursion, etc. for over a decade. For those who are just beginning, or might have come from a more business related course of study, this is tremendous stuff! If you don’t know the difference between head and tail recursion, the stack and the heap, or have never traversed a binary tree before then please do read!

My favorite part of this book is that no answers are provided for the exercises at the end of each chapter. This drives home the point that we must learn to think through our problems and solve them ourselves. A chapter is dedicated to “good reuse” vs. “bad reuse”, where one of the main differentiators is whether you’re reusing the code to learn from it or to avoid thinking.

Another great section was the final chapter, where Spraul visits the idea that each brain is different, and we might all apply the universal strategies in different ways. Then he walks us through his specific thought process for a newly presented problem, and how we can become continual learners.

Negatives? Not many. As above, more experienced readers might find discussion of sorting arrays a bit tedious. The examples are in C++ which could frighten some, but be assured that the code is written to be readable even if you have little familiarity with the language. Spraul gives some reasoning in Chapter 5 (Classes) for why C++ was a good choice, and of course you can work through the exercises in any language you wish.

Spraul seems to be an expert teacher of problem solving. I highly recommend this book to anyone who feels stumped when facing a new problem or could use some pointers on how to teach others who do.

You can check this out at O’Reilly.

I review for the O'Reilly Blogger Review Program

This post originally appeared on The DevStop.