Think Like A Programmer (Photo Credit: anorshop)

Think Like A Programmer (Photo Credit: anorshop)

Book introduction

“Think Like a Programmer: An Introduction to Creative Problem Solving” by V. Anton Spraul is a beginner-friendly book for programmers. Throughoutthe book the author tries to emphasize the importance of problem-solving and becoming a problem solver to become a good programmer. According to the author, the book is about problem solving. This book is a good read for beginners, but others can also find it interesting.

About Author

V. Anton Spraul has taught introductory programming and computer science for more than 15 years. He is the author of Computer Science Made Simple (Broadway), Think Like a Programmer (No Starch Press), and How Software Works (No Starch Press). He’s an award-winning teacher with two degrees in computer science and considers his nonfiction writing another form of teaching.

High-level Overview

The book starts with describing what a problem means in programming and how we should approach the solution. It gives them some of the tips and tricks for solving general-purpose problems.

Then from the second chapter, it starts with a C++ introductory session with some basic programming problems and their solution techniques. In the following chapters, it shows how we should think about some of the basic building blocks of programming, like arrays, pointers, dynamic memory allocation, classes, recursion, and code reusability, and how we should use them when solving problems. And all of these example programs are written in C++.

Insights and Learning

  • Always make a plan before coding or solving a problem.
  • Problems include constraints and unbreakable rules, so solution of the problem is something that must meets all the constraints and follow the rules.
  • Sometimes to solve a problem, we should/need to restate the problem. Rearranging the problem statement is a great way to find a solution.
  • Always try to think hard about the problem first rather than thinking about the solution.
  • Sometimes think about the solution of a large problem is not possible due to the limitation. In that case, break down the large problem into smaller parts and solve them by developing some strategy.
  • When a problem contains multiple parts that need to solve, then we should focus on the most constraints parts first.
  • Try to recognize the analogy of the the problem, its recommended to start thinking with the well known solution means start with what you know.
  • Always keep calm, don’t get frustrated.
  • Every programmer should need to know the low level structure of basic building blocks of programming, that is how these things work.
  • Understanding the memory management strategy of programming, pointers and dynamic memory management is essential for feeling the low level of programming.
  • Be conscious about memory leak when coding.
  • Understanding OOP, class, recursion, good code reusability helps a programmer think deeply and in a right direction.

Conclusion

As I mention earlier, this book is suitable, ideal and useful for beginner programmer. It helps them to think in right way about some of the basic building blocks of programming. Insights about array, pointer, dynamic memory allocation deallocation, memory management with stack and heap, thinking of code reusability are really important stuffs for anyone.

Personally I was excited and had a lot of expectations from this book. First chapter was too good but unfortunately from the second chapter it turns into a beginner book. Sadly title of the book is not fully reflects by the content.