Think like a programmer

Quick take

Advice from a programmer.


Don't know where this came from.

Always have a plan.

Planning also allows you to set intermediate goals and achieve them. Without a plan, you have only one goal: solve the whole problem.

Restate the problem

a problem that looks very difficult may seem easy when stated in a different way or using different terms.

Restatement sometimes shows us the goal was not what we thought it was

Divide the Problem

Finding a way to divide a problem into steps or phases can make the problem much easier. Start with What You Know

Reduce the Problem

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.

Look for Analogies

Although recognizing analogies is the most important way you will improve your speed and skill at problem solving, it is also the most difficult skill to develop. The reason it is so difficult at first is that you can’t look for analogies until you have a storehouse of previous solutions to reference.


Sometimes the best way to make progress is to try things and observe the results.

An experiment is a controlled process. You hypothesize what will happen when certain code is executed, try it out, and see whether your hypothesis is correct.

Don’t Get Frustrated

here are some thoughts you can employ that will help. First of all, never forget the first rule, that you should always have a plan,

when it comes down to getting frustrated or taking a break, you should take a break. One trick is to have more than one problem to work on

Array patterns

Store, copy, filter, summarize.

Information hiding