What Should You Do When You Are Stuck on a Programming Problem?

How long should you stick to it?

Abrar Masum
5 min readAug 12, 2021
People pushing a van on a dirt road
Photo by Aubrey Odom on Unsplash

If you are a programmer, you have been stuck in coding problems several times. I still get stuck. Even most of the senior programmers face it frequently.

As a programmer, it’s an important virtue to determine how much time you take to solve a problem and how to find the solution. In the beginning, many programmers take help from others, and that’s normal.

But with time, it’s important to solve the problems by yourself. Almost all senior programmers can solve most problems by themselves.

How to get unstuck?

There are several ways. When the code doesn’t work, my friend often says to restart the computer, the problem might be solved. Haha.

There are no specific ways to get out of the problem, but the industry and senior developers follow some procedures.

Try To Understand the Problem Better

This might sound silly, but this is the reason behind 99% of problems. There are many kinds of problems we get stuck on in daily coding life. Most of them can be classified into three categories:

  1. Code is not working the way you expect.