Think Like a Programmer Aims to Bridge Gap Between Syntax and Logic

Do you think your one hour of research on WebMD makes you qualified to self-diagnose? Then you might be surprised to find that learning a programming syntax in a three week online course does not make you a programmer. That example may be an blatant exaggeration, but it's still very common among the general public to believe that learning programming is as simple as learning a programming language. Not so. And it's the knowledge gap between syntax and logic that author V. Anton Spraul successfully introduces in Think Like a Programmer: An Introduction to Creative Problem Solving.
Image may contain Electronics
Think Like a Programmer by V. Anton Spraul

All products featured on WIRED are independently selected by our editors. However, we may receive compensation from retailers and/or from purchases of products through these links.

Do you think your one hour of research on WebMD makes you qualified to self-diagnose? Then you might be surprised to find that learning a programming syntax in a three week online course does not make you a programmer. That example may be a blatant exaggeration, but it's still very common among the general public to believe that learning programming is as simple as learning a programming language. Not so. And it's the knowledge gap between syntax and logic that author V. Anton Spraul successfully introduces in Think Like a Programmer: An Introduction to Creative Problem Solving.

For all self-taught programmers, I always strongly suggest taking Computer Science classes at your local community college. There are dozens of reasons why I suggest this. Because a class will force you to put in practice time. Because a teacher will notice your bad programming habits and try to correct them. Because at some point while programming, you're going to get stuck and you're going to need help. And because when it comes to core concepts, there's just no substitute for a good teacher.

However, I realize attending a CS class isn't always feasible for everyone, and Think Like a Programmer can serve as an decent alternative for the programming amateur. This book resembles a Data Structures and Algorithms class in some of the material it covers, like how to use data structures as tools for problem solving. Spraul has taught intro Computer Science classes for over fifteen years and it shows. He does a great job showing the theory using concrete examples, and rightfully puts a great deal of emphasis on programming exercises to strengthen the concepts.

My biggest problem with the book is the misleading title. "Think like a programmer" seems to imply that this is a book to teach the tricks of logical problem solving to non-programmers. When I picked it up, I honestly thought that's what it was going to be. Not only is it confusing, but the ideology behind what it means to "think like a programmer" or whether it can even be taught is a subject sensitive enough to be worth a thousand debates in the programmer circles, all likely to include a detour down the nature vs. nurture lane and finish with someone bringing up Hitler.

Another downside is that the coding examples in the book are written in C++. While most of the concepts are applicable to other languages, I feel that C++ isn't the most readable of the bunch. Moreover, there's an entire chapter on pointers and dynamic memory which can be very C++ specific, but perhaps that's just a necessary evil.

Negatives considered, I still think this is a great programming book, especially for the self-taught makers and tinkerers who might have dabbled into programming projects and would like to learn more educated tactics. It would also serve quite well as a supplement to the beginning Computer Science student. Additionally, the exercises provided in the book are similar to the puzzler questions I've been asked during software engineering interviews with Google and Facebook, so it may be a good refresher for professional programmers getting ready to interview for a new job.

I received a copy of this book for review.