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)
Walk away! Take a break. Do anything else.
Chances are, the solution will come to you in time.
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.
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 😅
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.
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.
Yes! Focusing on a simpler problem first almost always helps us solve the larger problem too.
Hi Dan. I actually just did a talk about this at codeland check it out dev.to/rukiaasm/working-smarter-5-... hope that helps.
No way! Thanks for sharing. :)
You’re welcome 😊
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.