Staying stuck rarely leads to a solution or a happy day; don't stay there.
This post is adapted from my digital debugging guide, Don’t Stay Stuck: A Debugging Guide for Rising Engineers.
We've all seen this: a frustrated coworker hunched over a computer after hours, flailing against some impossible bug. Or been that coworker ourselves.
Persistence has limited power. Put your problem in a timebox, or go home.
The Limited Power of Persistence
Persistence is important in computing, but it can only take you so far.
I once took a CS course that featured an online puzzle where you had to perform a series of tasks in a seemingly random order to solve it. The solution required brute force. You tried each step until something happened, and then you tried another. I found it maddening, and I gave up.
It was intended to be a lesson in persistence: sticking with a problem without clear feedback. I learned that, along with an anti-pattern that took years to shake: staying stuck for too long.
Sticking with a problem is a virtue in programming. If we all walked away anytime we were stuck, none of us would become expert debuggers. But if you're deeply stuck, the process soon loses value. You're no longer demonstrating persistence; you're feeling defeated and alone. When you get there, I recommend stepping away from the computer.
Put it in a Timebox
Still persisting? My advice is to timebox your solo debugging: give yourself twenty minutes to an hour to spin your wheels, then ask for help.
When the timebox ends, and you ask for help, you can still learn, because the person you asked might not be available or capable of solving the problem. They might only offer an idea. That meager crumb can lead you back to the trail.
Go Home
If you can't get help and it's an appropriate time, go home. Let your brain work on the problem while you sleep.
You've solved hard problems before, and you can solve this one. Sometimes, the easiest way to do that is to step away.
I can't count the number of times I've labored over a bug all afternoon, gone home exhausted, then come back and fixed it within minutes the next morning.
Conclusion
Staying stuck is frustrating and rarely leads to a solution or a happy day; don't stay there.
Cover Photo by Aubrey Odom via Unsplash
Top comments (0)