DEV Community

Cover image for What Helps You Get Unstuck When Coding?
Dan Goslen
Dan Goslen

Posted on

What Helps You Get Unstuck When Coding?

Getting stuck on a problem is inevitable as developers. Whether it's an algorithm or trying to re-produce a difficult error it can feel like you are never making progress.

What tools or tips do you use to get "un-stuck" in moments like these?


Cover photo by Aubrey Rose Odom on Unsplash

Top comments (10)

Collapse
 
scrabill profile image
Shannon Crabill

Walk away! Take a break. Do anything else.

Chances are, the solution will come to you in time.

Collapse
 
ahferroin7 profile image
Austin S. Hemmelgarn

Entirely agreed. I typically take two short (about 1.2km) walks each work day, and quite often I either come up with a solution to an issue I've been working on during the walk or right after getting back from it.

Collapse
 
messerli90 profile image
Michael Messerli

This. "Unfortunately" I quite smoking, but I used to constantly solve problems I was banging my head against when I stepped out for a smoke. Now it takes more discipline to take regular breaks ๐Ÿ˜…

Collapse
 
scrabill profile image
Shannon Crabill

A "hack" that I use is always having a glass of water at my desk. Not a huge thermos or water bottle, just a class. I'll have to refill it on occasion or use the restroom, which forces/reminds me to get up at least every few hours.

Your body and brain will thank you.

Collapse
 
____marcell profile image
Marcell Cruz

I would argue that there's is only one way to get unstuck, and that is to make your problem simpler, focus on each individual part and what this part should do, then move to the next part, don't try to do anything fancy that make it work. You can improve your implementation afterwards.

Collapse
 
dangoslen profile image
Dan Goslen

Yes! Focusing on a simpler problem first almost always helps us solve the larger problem too.

Collapse
 
rukiaasm profile image
Rukia

Hi Dan. I actually just did a talk about this at codeland check it out dev.to/rukiaasm/working-smarter-5-... hope that helps.

Collapse
 
dangoslen profile image
Dan Goslen

No way! Thanks for sharing. :)

Collapse
 
rukiaasm profile image
Rukia

Youโ€™re welcome ๐Ÿ˜Š

Collapse
 
anubra266 profile image
Abraham

I leave the code, and do something to clear my head. Maybe take a walk, sometimes just sit into some loud music. Anything to clear your head does the job for you.