How To Think Like A Programmer

How To Think Like A Programmer

A personal review from "Think Like A Programmer" by V. Anton Spraul

Hi guys, have you ever struggled with writing a program despite your in-depth knowledge of programming languages? Well if yes, you are not alone as there are days when I take up a coding tutorial video and nod all the way through only for me to get lost when implementing it on my own program. So yes! It is completely normal.

Generally, the most challenging issue every programmer faces is solving algorithms, other issues are keeping up with updates and technologies, debugging, and working on other programmers' code. There must always be a problem in the world of a programmer.

General Problem-Solving Techniques

During the course of going through this eye-opening book by V. Anton Spraul, I was happy to come across some tips to boost a programmer's problem-solving skills and techniques. Here are a few:

  • Always Have a Plan:

As the saying goes "if you fail to plan, then you plan to fail". It applies to any problem including programming too. Understanding the problem is always part of the plan towards solving the problem.

  • Restate the Problem:

Some problems that look very difficult may seem very easy once they have been restated in a different approach or using different terms

  • Divide the Problem

When we divide a problem, we unconsciously place them in the order of difficulty and in the order of size. Doing this creates a pathway for solving the problem.

  • Start with What You Know

In programming, there is what we call the brute force approach in solving algorithms. It basically means using what you already know how to do and working outward from there. According to V. Anton Spraul

"by starting with what you know, you build confidence and momentum toward the goal."

  • Reduce the Problem

According to V. Anton Spaul

''with this technique, when faced with a problem you are unable to solve, you reduce the scope of the problem, by either adding or removing constraints, to produce a problem that you do know how to solve''.

Other problem-solving techniques include experimenting with instant ideas, and probably not getting frustrated