DEV Community

Discussion on: What do you do when you're stuck?

Collapse
 
maxdevjs profile image
maxdevjs

Plenty of amazing suggestions and examples in these comments.

I leave my overall (not so different) approach too, never knows :)

TL;DR

It is personal, but I do think that for me it is necessary a radical "cut" from the issue. I find it is counterproductive to check social, etc. At a certain point, I take the screen (pixels, fonts, IDE/editor, sites, etc) out of the equation.

So...

  • when really stuck and with not much help from online searches, I try to dive deeper in the stuck situation: for a few minutes, I deliberately go through the issue "thinking" the same exact way (that I know, generally is wrong and will not bring any solution)
  • I open a few tabs (A) resulting from a search with that way of thinking
  • I quickly scan those pages
  • afterwards, I change a bit the point of view and I open a few more tabs (B) exploring an error in a different way, etc
  • quick scan to the new pages
  • I take a break from technology: if possible going for a walk, exercising a bit. Whatever allows me to not stare at a screen and mainly physically demanding activities
  • in the meantime, a background job in my brain scans the issue from different points of view
  • when back, if I do not already have some clue to follow, I often (basically, always) realize that I was anyway looking at the issue with a wrong assumption, doing the wrong questions
  • I take a glance both to the A and B tabs, often I spot some detail that brings me on the right path

This process helps me a lot.

It is not always viable if being in a hurry: can help in a few minutes, hours, or not. A few weeks ago I was stuck (luckily enough, with a personal project) and a solution arose after three days ;)

Points I take in account:

  • to look at the issue from different point(s) of view
  • if nothing solves, going for a different implementation (often comes out to work well and to be way simpler that the previous one)
  • I remix the steps based in current situation
  • and, generally, I do not care much if I can not solve it alone and immediately!
Collapse
 
krl87 profile image
Kayley

Thank you for your perspective Max! I appreciate you going through that. Very thorough, will have to try and adapt some of your practices.

Collapse
 
maxdevjs profile image
maxdevjs

Paraphrasing A.E., if I had an hour to solve a problem I'd spend 55 minutes thinking about the problem (mostly indirectly) and 5 minutes thinking about solutions.

Take care, Kayley :)