DEV Community

Flávia Bastos
Flávia Bastos

Posted on • Originally published at on

Book review: Think Like a Programmer

Note: I’m not being paid or receiving any kind of compensation for this review.

TL;DR: This is a very good book. If you are a software developer I highly recommend it!

Book cover of “Think Like a Programmer”, by V. Anton Spraul

Earlier this year I finished reading: Think Like a Programmer: An Introduction to Creative Problem Solving, by V. Anton Spraul and I highly recommend it, not only for software developers, but to anyone who wants to learn some techniques about problem solving and how to approach a puzzle or problem. Granted, it will be a lot easier if you know one programming language (or two, or five!) since all the coding examples are written in C++ but there are principles that apply to any kind of problem solving, such as:

When solving problems, working with a specific goal in mind is always better than random effort, whether you achieve that specific goal or not.

V. Anton Spraul, on “Thinking Like a Programmer”, location 507

Even though I don’t know C++ (I am sort of learning C#/.NET now), most – if not all! – the coding examples are easy to understand and are always followed by a line-by-line explanation, so not knowing C++ shouldn’t prevent anyone from checking this book out. Also, the author is an experienced teacher and his explanations are very comprehensive.

I have to admit that it took me quite a long time to get through the book (6 months, when I usually read a whole book within a week or two, tops). It’s not a simple read but I believe it’s well worth the time. I also have to admit that despite the author’s plead for readers to complete the exercises proposed at the end of each chapter, I didn’t do any. ¯_(ツ)_/¯

Enough rambling! Here are some of my highlights:

Programming is an art, y’all!

Make no mistake: Programming, and especially problem solving, is a creative activity. Creativity is mysterious, and no one can say exactly how the creative mind functions.

V. Anton Spraul, on “Thinking Like a Programmer”, location 222

Planning before acting is not a waste of time!

In solving programming problems, we are sometimes faced with situations where we can’t see a clear path to code the solution, but we must never allow this to be an excuse to forgo planning and systematic approaches. It’s better to develop a strategy than to attack the problem through trial and error.

V. Anton Spraul, on “Thinking Like a Programmer”, location 499

This is perhaps the most important rule. You must always have a plan, rather than engaging in directionless activity.

V. Anton Spraul, on “Thinking Like a Programmer”, location 635

Restating a problem is like circling the base of a hill that you must climb; before starting your climb, why not check out the hill from every angle to see whether there’s an easier way up?

V. Anton Spraul, on “Thinking Like a Programmer”, location 664

Break it all down!

Finding a way to divide a problem into steps or phases can make the problem much easier. If you can divide a problem into two pieces, you might think that each piece would be half as difficult to solve as the original whole, but usually, it’s even easier than that.

V. Anton Spraul, on “Thinking Like a Programmer”, location 682

And a lot more! Special shout out to chapter 6: “Solving Problems with Recursion“. I thought I understood recursion before reading this chapter but it helped me see it through a different angle.

The post Book review: Think Like a Programmer_was originally published at

Top comments (0)