Cover image for 3 Things to Do When You Got Stuck in Coding

3 Things to Do When You Got Stuck in Coding

mohammedasker profile image Mohammed Asker ・3 min read

Photo by Aubrey Rose Odom on Unsplash

When you begin to practice programming for the first time, you'll encounter many challenges as a developer and one of them is errors. When this happens (Trust me, it will happen every single time), we use the method called the "Read, Search, Ask". In this article, we'll explore how this method will help you to solve the issue without going overboard.

1. Read the error messages first

Alt Text

Photo by Joel Muniz on Unsplash

The first step to solve the problem is by looking at the error message. What is the type of error? Where is the source of the problem? When you open Google Chrome console and looked at the message, you'll see a link next to an error message that will point you to the source code that causes a problem.

If you're lucky enough, the solution might be simple enough like typos in your codes or you forgot to close the brackets. Once you're positive that this is not the case, then let's move on to the next step.

Note: In Firefox console, there's a link which will open a documentation page related to a particular error that provides a thorough explanation. This is a pretty neat feature to learn more about the errors and possible ways to solve the issues.

2. Research the problem

Alt Text

Photo by Aubrey Rose Odom on Unsplash

The second step to fix the error is to research on Google. When you don't understand the message of the error, it's much quicker to just copy the message and paste it on the Google search and see where the results will lead you. For the most part, you'll see Stack Overflow on the top results and click the links that are relevant to your problem.

If that solved your problem, then awesome! You have solved a problem and you're one step away from being self-reliant - which is a very handy skill to have. Sooner or later, you'll find yourself googling a lot and that's very common among the developers. It's part of our job!

Notes: While Stack Overflow is extremely helpful, you shouldn't limit yourself to one resource only. Check out the GitHub issues, forums, and of course the official documentation for programming languages.

3. Ask for help when none of these worked

Alt Text

Photo by Austin Kehmeier on Unsplash

Sometimes, even if we do our best to solve the problem, there will be times when we cannot fix it on our own. At this moment, enlisting someone for help will be vital to find solutions to the problem. By bringing in a real person to look over at your codes, you'll discover your mistakes and depending on who's helping you, they'll also provide you with some tips and resources they use to solve the problems.

One thing that you should be aware of is to know when to ask for help. While the timing may vary from one person to another, a rule of thumb is if you did not fix the issue within 30 minutes, then ask for help. And how often should you ask? As much as you want. The more you ask, the more you learn.

Where to get the help?

  • Your family, friends, or colleagues who happen to be a software developer
  • Twitter - Use #100DaysOfCode and #CodeNewbie hashtags when asking for help and post an image of your code. You'll be surprised at how eager someone wants to lend you a hand!
  • Stack Overflow - When asking a question, please follow the guideline outlined during the process of creating a new question. While the folks there will be happy to help you, they want to see that you have put some effort into it and explain the things you tried.

Word of encouragement

Getting stuck is perfectly normal and it happens to all of us no matter how long we have been in the industry. Whether you wrote your first "Hello World" or building a huge, complex application for a world-class company, there will be always a bug that blocks your progress.

Learning how to cope with this setback and find ways to overcome it will be key to grow as a developer. Give yourself at least 30 minutes to troubleshoot the problem by yourself. After the time has passed and still haven't figure out the problem, then it is time to look for help.

I hope you find this article beneficial and happy debugging!

Posted on by:

mohammedasker profile

Mohammed Asker


Front-end developer documenting my journey in coding • Anime fan • Bookworm • #100DaysOfCode challenger


Editor guide
  1. Research the problem

This is one of the biggest differences, in my experience, between people who pick up tech naturally and people who struggle a little more at it. People that already do this for their tech problems will have a much easier time learning to program and debug


So true! This is how I learned to program effectively. Thanks to this technique, I also started to apply it in my daily life situations and to my surprise, it works most of the time.

Except for medical and law issues, the solution to any problem is one google away! 🔍


Or take a nap. A lot of the times I find sleeping to be a solution. My brain can't stop thinking about that problem and eventually it will find a way to solve it.


There's a science behind why sleeping helps you to solve the problem. I'm actually planning to write an article about it in the near future.


If you can't figure it out, take plenty of rest, it does wonder.


I couldn't agree more!