Jake Worth

Jake Worth

Don't Stay Stuck

Published: March 01, 2022 2 min read

We’ve all seen this: a frustrated coworker hunched over a computer after hours, flailing alone against some impossible bug.

Go home, coworker. Or more importantly, don’t stay stuck.

I once took a CS course that featured a puzzle where you had to perform a series of tasks in a seemingly random order. The solution was not discoverable without brute force. You just tried each step until something happened, and then you tried another. It was maddening, and I gave up.

This was presented as a way of teaching resilience. Sticking with a problem without clear direction. While an interesting exercise, I learned an antipattern I held onto for years: staying stuck.

Sticking with a problem is a virtue in programming. If we all walked away anytime we were stuck, none of us would become expert buggers. But if you’re really stuck, soon the process loses value. You’re no longer learning resiliency, you’re just feeling defeated and questioning your life choices. When you get there, I think it’s time to step away.

My advice is to timebox your solo debugging. Give yourself twenty minutes to an hour to spin your wheels. When that timebox ends, ask for help from somebody more experienced. You can still learn, because they not might want to or be able to solve the problem. They might only offer an idea. That meager crumb can be life-saving. You’re back on the trail.

If you can’t get help and it’s an appropriate time, go home. Let your subconscious work on the problem while you sleep.

Don’t stay stuck.

Get better at programming by learning with me. Subscribe to my newsletter for weekly ideas, creations, and curated resources from across the world of programming. Join me today!