Timebox yourself. At work I drudge through 10y/o legacy code, so I get into this situation from time to time. Typically I’ll give myself x amount of time to look at a problem from one angle before stepping back to think of any other solutions.
Came here to say this! Such a great technique.
Yep, timeboxing is the best
Actually this way is used to prevent systems from infinite loop, in many domain specific languages
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.