TechBookReport logo

Keywords: Programming, algorithms, C, C++

Title: Think Like A Programmer: An Introduction to Creative Problem Solving

Author: V. Anton Spraul

Publisher: No Starch Press

ISBN: 978-1593274245

Media: Book

Level: Introductory, though knowledge of C or C++ useful

Verdict: Well worth reading if you're a beginning programmer wanting to up your game


The vast majority of computer books promise to make you a better developing by focusing on teaching a new programming language, new development paradigm or a specific technology. While these can be interesting, the plain fact is that for many new developers what's needed is not more syntax but more practice and not just practice doing the same things. And this is where this book steps in. The emphasis is not on syntax, programming theory or even application domain. Instead this is a book that's intended to help the new (and perhaps not so new) developer extend their skills by, essentially, reflecting and thinking about programming in a way that they possibly wouldn't normally.

On the whole this means focussing the attention on problem solving, algorithmic thinking, developing structured work habits and really paying attention to the process that you go through when developing code. Note that this is not the same as presenting a set of ready made algorithms or design patterns. While there are lots of good books on algorithms and data structures, and generally these really ought to be on the reading list for every serious developer, this is not what's on offer here. Instead the author presents some simple problems and in solving these in a step by step fashion he draws out lessons and code that are further developed. So, for example, a standard data structure like a linked list is introduced and coded from scratch rather than just being taken off the shelf and slotted into place.

Good developer skills, like decomposing problems into manageable chunks, solving specific sub-problems in order to generalise solutions, building your own code libraries and so on are central to the book. While some of this might seem obvious to a grizzled old pro, they're skills that are likely to be missed if your focus is on learning the syntax of a language or you're struggling to understand object orientation and so on.

As you would expect there's plenty of code in the book, and it's here that the book hits a stumbling block. The language being used is C++, which is fine if you've got some experience of it (you don't need to be a guru, honest). In some ways it's a good language to use because it can be used to write procedural as well as object oriented code, and it gets you directly into pointers and references, all of which are good in this context. However, it does limit the readership somewhat. If you've never programmed in C or C++ then the sections of pointers is going to be tricky, particularly when dealing with linked lists, function pointers and so on. It's a shame because there are plenty of new programmers out there who are learning Java or Python or other language and who'd benefit from this book but will be put off because the code samples won't mean much to them.

Aside from the emphasis on code and problem solving, the author also takes the time to look at ways in which you can learn more. There are discussions of design patterns, class and object libraries, APIs and so on. The author provides some suggested ways that these can be approached, pointing out things like the trade-offs between flexibility and work required. So while a design pattern is maximally flexible, it's also the hardest to implement, while an API call is much less flexible but incredibly easy to incorporate into your code.

The ultimate lesson of the book is that improving as a developer doesn't have to be a slow and laborious affair left to chance. Moving up a step can be the result of a structured program of self-improvement and reflection. If you're serious as a developer and are only just starting out, this is definitely a lesson worth taking to heart.

Hit the 'back' key in your browser to return to subject index page

Return to home page

Contents © TechBookReport 2012. Published October 03 2012