What actions you should take when you are stuck on a coding problem
Tags: career, beginners, webdev, productivity
Published: 2020-08-05 03:09:58

*This post was originally published on June 30, 2020 on [my blog](https://www.theodoroskokosioulis.com/posts/what-actions-you-should-take-when-you-are-stuck-on-a-coding-problem).*

Have you ever felt stuck on a coding problem? I know it’s a rhetorical question 😛. It’s almost impossible not to get stuck at some point throughout your career as a software engineer and not only once. This is the nature of our job. To solve riddles every day. We accepted that reality when we decided to get involved with code either professionally or as a hobby. Even senior software engineers will encounter unknown concepts for them. If you are in this position I can totally relate with you. I know very well how frustrating it can be. First things first, do yourself a favor and don’t beat yourself up or even worse don’t start having doubts about your existing skills and your experience. That’s something you definitely not need!

Don’t worry though, I’ll do my best and try to help you by giving you some tips that personally helped me go through such situations in the past.

#### 1. Read the documentation
Yes, I know this might sound mundane but trust me this can be most of the time the solution to your problem. The documentation will (almost) always provide you with what you’re looking for. Even if it is poorly written, a simple search to its API could be proved very helpful. Personally, I refer to the documentation before jumping into other mediums. Be sure you have a clear understanding of the input, processing, and output expectation of each code unit and how that matches the principles on the documentation. Many times I have started working on something without even reading the documentation in the first place believing that I’ll figure it out by myself and had nothing but an undesired result.

#### 2. Break it into smaller chunks
This is the first principle of software engineering. I’m quite sure that you have never worked on something complex enough and you managed to get it to a satisfactory point without breaking it into smaller tasks. This is how we go from A to B point. We have the big picture in our mind but in order to achieve the end result, we go step by step and build around it.

#### 3. Search Google
We definitely can’t neglect the help of the Google search. They say that a good Googler is a good software engineer as well. That’s 100% true but that, only, is not enough by itself. It’s not only the Google search per se but the fact that you have to know exactly what to expect on the results. You’ll become more experienced on that as time goes by. You’ve probably seen that before. You searched for something and you didn’t get back what you expected from, but when you modified your query you finally got the answer to your problem.

#### 4. Ask for help
Don’t be afraid to ask for help. No one born to know everything at the beginning. Colleagues, stack overflow, Facebook communities, and slack groups are one of the best mediums you could address your problem to. Always a second pair of eyes can make the difference. What may appears to be elusive for you might be obvious for someone else. If you need instant support from an experienced software engineer I highly recommend using [codementor](https://www.codementor.io).

#### Conclusion
I hope you found these tips useful enough! Let me know which one(s) you use often and what other approach have you taken to tackle this situation.