DEV Community

Emmanuel Obogbaimhe
Emmanuel Obogbaimhe

Posted on

What do you do when your stuck?

What do you guys do when you get stuck on a particular issue for a prolonged period of time? Especially those issues that are difficult to track, were you can't find a solution on Google or Stack Overflow

Top comments (9)

Collapse
 
theminshew profile image
Michael Minshew

I get up and stretch or do a bit of burpees, sometimes I do the dishes or go for a hike or shopping. Something to completely take my mind off the problem. Sometimes I take a nap or just watch a bit of tv. When I come back to the problem its with fresh eyes and that helps a ton. A lot of times i'm stuck because i get fixated on a little piece of the puzzle and don't realize the solution is elsewhere in the program.

If that does't work i start crawling through documentation lol.

Collapse
 
emmanuelobo profile image
Emmanuel Obogbaimhe

Nice I do something similar, just that I've been having a real issue with a problem lately and haven't made much progress. Going to go back to crawling the documentation more in depth I guess. If that doesn't work then I can start crawling under a rock lol.

Collapse
 
theminshew profile image
Michael Minshew

Hope you can solve it soon!

Collapse
 
whoisryosuke profile image
Ryosuke

Time + distance allows the mind to approach the problem from a different mindset. A lot of problems arise from running a marathon of code and letting your head get oversaturated with mental constructs.

Collapse
 
andrewlucker profile image
Andrew Lucker

If you doubt yourself, keep working on it. If you doubt your tools, workaround it. Being able to place the blame is a learned skill.

If you continue with your chosen approach, but don't find a match on Google or Stack Overflow, then try narrowing down the scope of the problem until you can place the blame. Some people like debuggers for this, personally I like checkpointing print statements and logs. If the problem continues into a library, then go to the source.

Sometimes there is nothing you can do except workaround. There are compiler bugs. There are OS bugs. There are hardware bugs. These are exceptionally rare.

Much more common is your program or a library is corrupt. My personal peeve is double freed memory. It is really common in code or libraries and causes exceedingly strange failures.

Collapse
 
emmanuelobo profile image
Emmanuel Obogbaimhe

Thanks for the feedback Andrew, I agree with this approach. This issue happens to me mainly because of third party libraries. Which kinda sucks because sometimes its completely out of your control or hard to find which other dependency is causing the issue with that specific library.

Collapse
 
jess profile image
Jess Lee

Ask The DEV Community 😇

Collapse
 
isaacdlyman profile image
Isaac Lyman

Ooh, I just wrote about this one: dev.to/isaacandsuch/so-youre-stuck...

Collapse
 
emmanuelobo profile image
Emmanuel Obogbaimhe

Cool stuff. I'll check it out. Thanks man.