Important Things to Remember While Programming

  • Drink enough water.
  • Listen to calm or soothing music.
  • A computer does not have common sense (this is very important).

Let us understand the third point with a simple example.

Imagine you tell a human to walk 200 steps. If the person reaches the 100th step and finds a very hard obstacle that cannot be crossed, the person will naturally stop and come back. This happens because humans can think and make decisions on their own.

Now think about a computer. If you program a computer to go 200 steps, it will try to go all 200 steps no matter what happens in between. Even if there is an obstacle at the 100th step, the computer will still try to move forward. It will not stop or come back unless you clearly tell it to do so.

This is because a computer only follows the instructions written in the program. It cannot think, guess, or use common sense. If you want the computer to stop, turn back, or handle a problem, you must write exact instructions for that situation.

In simple words:
A computer does exactly what you tell it to do—nothing more, nothing less.

PS: By “telling the computer,” I mean writing a program.