Sometimes I struggle with hard problems, and I’m not sure how to solve them, but I don’t want to waste the moment, so I do the same kind of little stuff you’ve described. This keeps me in the zone and gives me time to process the problem that’s kicking me in the face. It’s especially true when I know I’ve gone the wrong way but still don’t know what the right way is. So I clean up a controller that should have been two (or more), or I get rid of deprecation messages, or something else. And, before I know it, I have an idea, or I see the problem in a better light, and suddenly solving it seems trivial.