Re:Ask HN: How do you approach a problem when you are stuck?
by JohnFen on Wednesday March 11, 2020 @12:42PM
(#22547228)
If I'm well and truly stuck, then what I do is put the problem on the back burner for a while (typically a day or two), and work on a different, preferably unrelated, thing. I very often find that when I come back to the problem I was stuck on, I find a solution or direction that I was blind to before.
I use this "distraction" technique when I'm stuck on any problem in life, too, not just programming ones. I find it very powerful.
If I remain stuck, then I begin to entertain the idea that the problem itself is the result of a different problem elsewhere and investigate that possibility. Sometimes a problem is intractable because the issue isn't really in the code you're working on, but is the result of a larger design issue.
I use this "distraction" technique when I'm stuck on any problem in life, too, not just programming ones. I find it very powerful.
If I remain stuck, then I begin to entertain the idea that the problem itself is the result of a different problem elsewhere and investigate that possibility. Sometimes a problem is intractable because the issue isn't really in the code you're working on, but is the result of a larger design issue.