Ceci est une ancienne révision du document !
Think Like A Programmer by V. Anton Spraul (published by No Starch Press) is a 226 page, 8 chapter long book, of typical “technical manual” dimensions. That's essentially where the similarities to most technical instruction books end. As opposed to books like “Programming PHP” or “Beginning Python”, this book doesn't aim at teaching you a specific programming language. Indeed, it assumes a fair amount of knowledge of C++. Which isn't to say that knowledge is necessarily required for this book. If you're comfortable piecing together a working knowledge of C++ through examples, or can convert solutions into a language you're more comfortable with, it should still prove rather enlightening. After all, the actual goal of this book is to introduce you to creative problem solving. Specifically, it tries to teach you a method of approaching complex problems, and to break it into its constituent parts, to allow you to make better progress.
Method
The first thing that struck me about this book is the method with which they teach. The first chapter is dedicated solely to the strategies for solving problems. They do this by offering puzzles and riddles which, while solvable, aren't immediately answerable by the reader. The reason for this is due to the listener assuming implications that don't exist. For example, assuming the possible actions listed in a problem are the only actions you can take. By exposing you to these sorts of problems from the beginning, the author is hoping to make you more aware of the assumptions you're making. In doing this, you then also become more aware of your specific method for answering problems, allowing you to better follow the later problems and discussions. The answers to each puzzle are also clearly explained in the author's own methodology, while still encouraging the reader to explore other possible solutions. As such, I find this is one of the most helpful books I've read, due to the fact that it guides you towards designing a system for yourself, as opposed to encouraging a mindset where there can be only one correct method.
Excercises
Besides discussing the strategies behind problem solving, this book also offers a slew of actual exercises to solve using C++. Obviously, almost all of these problems can all be solved in most programming languages; the answers supplied are simply in C++. Each successive chapter is dedicated to driving the original strategy home. This means that it helps you to break down a problem, to notice which sections of a problem you may have already answered, and how to keep up the motivation to solve a problem. However, each chapter focuses on a specific type of problem. For example, Chapter 2 is focused on input, output and tracking the state of a program, while Chapter 6 focuses on recursion. This approach to teaching helps cement the basic strategies for solving the problems, while helping you apply them to a multitude of practical examples. It also helps you understand certain aspects of programming (especially in C++) that can sometimes be abstract, or confusing to comprehend.
Diagrams
One aspect of the book that I found made it much more approachable is the liberal use of diagrams, tables, and thought processes. For example, for some of the more convoluted puzzles, the book usually offers a diagram to help explain what is meant. This can help you to understand, but also shows you how to translate word-based problems into visual representations. As such, if you're a big fan of visualization, or simply a visual learner, the method and explanations in this book can be invaluable.
Explanations
For those who are most comfortable with written explanations, then you will also not be disappointed. The author has a writing style that is both easily understandable, and enjoyable to read. As opposed to most reference books, the author imbues a certain level of life to his prose, allowing otherwise dry and technical explanations to be entertaining.
Conclusion
Overall, I find this book is an excellent addition to any library of reference books, so long as you sincerely wish to learn. If you approach this book with the intent to learn as much about creative approaches to solving problems, you'll probably find that working through this book goes much quicker (and is much more entertaining) than you might have first assumed. If, however, you're already comfortable solving complicated problems, or have little interest in developing an approach to solving those sorts of problems, this book may be of little interest to you. For anyone uncertain of which group they belong to, I offer this advice: find a physical copy of the book that you can flip through, and looking through Chapters 1 & 2 should give you a very good idea of what to expect. If you have any specific questions, you're welcome to email me at lswest34@gmail.com, and I will do my best to answer them.