We cannot solve our problems with the same thinking we used when we created them. - Albert Einstein
Dear software developers, tell me if this has ever happened to you?
You become motivated to work on something. You work on it for a while and then out of nowhere, the code stops working as expected.
You try printing to see where the error is but nothing comes up. You step through using the debugger but no luck. It gets to the point where you start to think that the compiler is nuts. (PS: It never is).
I’ve found that taking a break and then coming back to debug with a fresh pair of eyes usually helps to uncover what the issue is. (Pomodoro anyone?).
The break can be working on something else or going for a small walk.
When I come back, I sometimes find that the bug is a minor error that was right in front of my eyes. There was a time I was frustrated only to come back and find that I was running the wrong testcase all along.
It’s like the small break shines a light on the code editor and I can finally see again.
Try it out. I’m interested to know if this is a me-thing or something that helps another soul.
Happy coding!