Avoid XY Problem
I stumble upon this Q & A from a totally unrelated topic, but found this is a more interesting topic. Because it resonates with me.
As a programmer, I constantly have to process a long chain of challenges and solutions within my own head (or on paper), eventually stuck on one problem, try doing some research online about that particular problem, only finds out that the problem I was asking (or searching for) is too far away from the original problem I was trying to solve. And more often than I thought, there's a better alternative solution a couple of steps earlier all along.
Question your own questions regularly.