Step 1: Set a Time Limit
Have you ever been stumped on a problem but when you start looking around for answers, you’re more confused than when you started?
When I built my very first website, I spent two months researching the same bug. At the time, I was afraid to ask for help because I did not want to seem inexperienced (even though I was). I considered fundamentally rewriting my code several times before finally running it by a senior developer. He spotted the issue within a few minutes and got me back on track in no time.
I went through this exact same experience a few times in other projects before I learned to set a time limit on problem solving. It could be 20 – 60 minutes (or a time limit that works for you). Once you hit that limit STOP.
Step 2: Do Your Research
With your time limit in mind, it’s time to start looking for answers. Here are some of my favorite places to look:
- Check your console and use pry, debugger, and console.log() to see if your program is behaving the way you expect and at what exact point it breaks.
- Google the error messages.
- Check the documentation for your language.
- Review your or a partner’s past code for clues.
- Read developer blog posts.
- Watch YouTube tutorials.
When I tackle a new feature that I haven’t built before, I check a wide variety of sources. With practice, you will identify trusted sources. Sometimes, you won’t need to proceed beyond this step.
Step 3: Take a Break
The World Health Organization now officially recognizes occupational burnout as a widespread issue and, thankfully, many companies are recognizing that they need to prioritize employee wellness.
So, just walk away.
It might seem like you are giving up on the problem, but don’t worry because your brain will continue to tinker with it in the background while you eat lunch, take a walk, play a game, laugh, and otherwise have fun.
Personally, my best solutions to code bugs often come when I am at the gym or right before I fall asleep. It might seem counterintuitive, but it really helps!
Step 4: Send Up a Flare
If you take a break but still don’t know what to do, it’s time to ask for help.
When you reach out to your coworker or supervisor, make sure to give them all of the information that they need upfront to solve your issue. This minimizes frustrating back and forth for both parties.
In my opinion, Stack Overflow has the most useful checklist for how to get your problems solved (more) quickly:
- Provide background information like the basics of the project and what the feature in question is supposed to do.
- Explain how your program is deviating from its goal and include any error messages.
- Mention any research performed in Step 2 and why suggested solutions there did not meet your needs.
- Don’t forget to share your code!
Sometimes I find laying out the issue systematically like this is all I need to spot the problem.
I hope these tips help you work smarter. Good luck on your problem-solving ventures!