Code-Switching to Improve Your Writing and Productivity
chroniclevitae.com
chroniclevitae.com
The point is that you are still doing useful work, and therefore are "productive" but your conscious mind is now focused on a completely different task. While you do that, the subconscious is still working on the thorny debugging problem and when you get back to it, you will find it easier to choose the next steps that break through the chaos and lead to the root cause of the problem.
This is important even if you are in crunch mode because of a deadline. Usually what happens is that insane focus on fixing an important problem leads you into a long chain of insane fixes that mask the real problem. Eventually the scotch tape and rubber band fixes collapse anyway. Better to manage your mind so that you have a chance to reach full understanding of the problem so that you can make the RIGHT fix that is stable and longterm.
This approach transcends disciplines I've found, although I've rarely had to apply it to coding.
Now, I'm stuck on another project. Think I'll try flipping between that and something unrelated. They're both code. Am wondering if the block is due to too much focus on one problem or too much time in front of a screen.
What if the break actually gives you time to forget chains of thought/instinct which didn't reach a satisfactory destination?
So you're really just clearing some state for your semi-random search algorithm, before re-running.
"Whatever the grand strategy for success is, it gets broken down into lots of smaller tasks. When you hit a wall on one task, you could say “that’s it, I’m done for the day” and head home, or you could switch over to something else that has a different rhythm and get more accomplished."
https://en.wikipedia.org/wiki/Code-switching
I also love this kind of code-switching, y me gusta poder hacerlo all the frickin' time.
I'm going to try this switching tactic generally. I had a project last year where I got stuck because I kept working at it while hitting too many tough points.