I disagree, if you get into this habit, you risk missing the forest for the trees, which is much more dangerous : for instance that you should have used a different programming paradigm, a different programming language, a completely different approach at solving the problem than coding that, or even sometimes solving that problem might be an actual waste of effort, better spent elsewhere !