Have you ever found yourself working on a problem and having troubles moving forward?
Have you found that you start looking at smaller and smaller changes, thrashing about with abandon as you lose focus with the bigger picture: actual problem you’re trying to solve?
Almost every developer will find themselves trapped in this loop once in a while. I have no idea if there is a word for this phenomenon.
To an outside observer, a object falling into the event horizon will appear to take an infinite amount of time to pass into the black hole due to the effects of time dilation.
Since, to the developer trapped in the loop it feels like you’re doing a lot of work, and yet, to an outside observer (which typically is yourself when you pull yourself out of the thrashing mindset) it appears as if you’ve got absolutely nowhere, I call this ‘black holing’ or a ‘coding event horizon.’
From Andy Puddicombe’s The Headspace Guide to Mindfulness and Meditation,
the more we live mindfully, in the moment, the more we start to get a sense of what feels right. Whether you think of it as a gut feeling, intuition, being guided, or just knowing for yourself that it’s the right thing to do, this can be an incredibly liberating discovery.
If you are concious and aware and present in your coding, you will start to recognize the feeling when you begin to approach the event horizon. It will feel wrong; a physical coding smell, if you will.
Focus on your breath once and a while as you code to remind yourself to be present and to think about what you are typing, what problem you are trying to solve.
Of course, that doesn’t mean that this will never happen again, just that hopefully you’ll catch it sooner and waste less time. The more often you catch it, the easier it becomes to recognize when you’re drifting into that state of coding inertia.
Once you’ve caught yourself in the coding event horizon, try going for a short walk. When you get back, talk through the problem with your coworkers, or write down the steps on paper. Often, this will be enough to pull you out of the black hole and get you back on track.
That’s it for now!
Happy coding!