Thursday, April 24, 2014

Review of the book "Think like a Programmer" by V. Anton Spraul



Creativity and problem solving is a very general skill set and can be applied in a multitude of applications. In Think Like a Programmer, an Introduction to Creative Problem Solving, V. Anton Spraul, a programming instructor, looks at how to approach computer programming through a lens of creativity. Written for new programmers or those just wanting to take their coding to the next level, this book takes a comprehensive look at the thought process that goes into writing a successful program.
Spraul is quick to point out that the hardest part of learning a new programming language is not the syntax (the text that you actually type), but rather the algorithms that go into making a program that gives you the results you actually want. While the book is chalk full of examples of more specific problems that a computer programmer might be asked to solve, Spraul continuously comes back to five main principles that a programmer must constantly keep in mind: having a plan, restating the problem, dividing the problem into smaller pieces, looking for analogies, and not getting frustrated.
There are a large number of different steps that can be taken to solve a problem, some of which can be wrong ones. When solving a problem, if no plan is formulated “you are simply hoping for a lucky break.” The best way to develop a plan is to restate the problem. In this way, the parameters become clear, and precise, calculated steps can be taken to solve the problem. As Spraul points out, “planning allows you to set intermediate goals” which are smaller and easier to solve.
Sometimes the formulation of a plan is not so clear. In this scenario, it is best to look for analogies. Many problems have similarities. For example, Spraul works through the solution to the classic “Fox, Goose, and Corn” problem, where a farmer must transport these three items across a river. Later on in the book, Spraul introduces a new problem that he created, the “Quarrasi Lock.” In the introduction statement, Spraul uses obscure names and an odd situation to try and throw the reader off. However, the problem is an exact analogy of the “Fox, Goose, and Corn” problem and can be solved in the same way. Recognizing analogies can save a lot of time and frustration.  
One thing Spraul does well in getting his point across is the layout of the book. Even though the book is intended for those whole are familiar with a programming language, anyone can benefit from the first chapter. It is in the first chapter that Spraul first introduces his five reoccurring themes mentioned above. No actual code is used in the first chapter; rather, Spraul focuses on the basics of algorithms and looking at problems in a more creative way.
As the book progresses, more and more programming knowledge is needed to comprehend the material. While the chronological order of the book is done well, one criticism I have of Spraul’s book is that it does progress rather fast. I could see a beginning programmer struggling to keep up with the level of algorithms used in the later chapters, syntax aside. For a beginner, supplemental materials are most likely necessary to complement this book. That being said, one nice thing about the book as a whole is that it can easily be fact checked. All one needs to do to test Spraul’s code is to compile and run it on a computer. This can also make it easier to follow Spraul’s logic as he works through the different example problems. 
As a student minoring in Computer Science, this book is very relevant to me now in my academics. While I know the basics of programming quite well, I am always looking for ways to improve the code that I write. There are many different ways to write a single program, and some are superior to others. Spraul has given me a lot to think about while trying to develop these greater algorithms, not only for my classwork, but also for programs I write for fun.
There is a lot I can take away from this book for my future career as well. My hope is to someday own my own consulting, research, and development company specializing in alternative energy. I think we face two main challenges in energy today: source and distribution. Finding a better, cleaner source of energy is where my Chemical Engineering degree will come into play. However, it is just as important that we can put systems in place to efficiently distribute energy. Computers and software will be an integral part of these distribution systems, and so my knowledge of programming will be of great use to me in my career. Starting to think more creative about the code I write now will hopefully make me that much more advanced in the future.
While my review has focused mainly on the programming applications of Think Like a Programmer, an Introduction to Creative Problem Solving, I do not think it does the book justice to limit it to one topic. Just as creativity can be applied in many ways, a programming mindset can in turn be used to look creatively at a wide array of problems. Approaching a problem while “thinking like a programmer” means approaching the problem in a logical fashion. It means looking at the problem in smaller, more manageable pieces, or looking for known patterns. One could argue that every thought process we go through while solving any type of problem is like an algorithm. As such, problem solving and programming thought process are necessarily linked. The better put together and more creative these thought processes or “algorithms” are, the better the results.

3 comments:

  1. I know next to nothing about computer programming and the language of computer, but it sounds like the bk you reviewed had good steps that could be applied to problems other than programming! Having a plan, restating the problem, dividing the problem into smaller pieces, looking for analogies, and not getting frustrated are all common steps that I find myself applying to the problems of my everyday life. The step about not getting frustrated is especially important to me and I think it is often overlooked. It sounds like you already have a number of great ideas that you will be able to form into concrete plans as you advance your education. I look up to you for being able to work with computer programming and maintain your composure, that's something I struggle with when I'm just trying to download programs on my laptop!

    ReplyDelete
    Replies
    1. Adding on to my previous comment, I think this is a great book review that not only emphasizes the main points on the book, but more importantly what you took away from the book. You were able to effectively explain concepts that I was unfamiliar with and provide information that was useful in critiquing the author's work. The last paragraph of evaluation shows thoughtful thinking and reflection about not only the topic of the book, but the authors overall purpose of writing it. Great job Ian! I love how passionate you are about what you're studying, it makes it way more interesting to read your reflection!

      Delete
  2. 1. How well did the reviewer address the sections listed in #3?
    -It seems to me that Ian has hit all of the sections listed in #3. He stated the author’s purpose which was computer programming through the lens of creativity. He noted the five steps that the author makes use of in his approach to programming. He made mention of the examples that the author used to show his points and to prove what he was saying. Ian used the accessibility of the book as a criteria for evaluating and then stated that this book has added creativity to his programming.
    2. What makes this review look original?
    - First off, this review looks pretty original because the writing style is what Ian usually uses with his blog posts, so I’m pretty sure that it’s not copied from the internet. Secondly, it uses examples that would apply to what Ian plans to do with his programming so it seems customized to him.
    3. Is the review fair/reasonable?
    - This review seems reasonable and fair as it touches on the author’s main points as well as adding information that pertains to Ian’s goals. The criticism seems reasonable as it points out that as the book goes on, the content becomes more complex.
    4. What can you take from this review?
    - From this review I can take away that, like many other types of problem solving, having a plan is key in programming and that sometimes you hit a dead end, but instead of giving up, you just have to look at things from a different perspective.

    ReplyDelete