You can use a simple technique that gets you unstuck when you've been banging your head against the wall because of a problem you can't figure out.
You tried everything to debug it, changing one thing at a time to see if it affected the outcome, thinking back to what you've changed since it worked, clearing the cache, reinstalling the dependencies, and restarting the server.
You searched on Google, checked Stack Overflow, and asked ChatGPT. You combed through the library's issue tracker, thinking it must be an external bug.
And yet, the problem endures.
You then write a detailed, clear description of the annoying problem you face on a help forum.
It would be best to detail everything to show others you're using their time effectively.
You are methodical because you want to catch everything relevant to your problem.
Before you hit submit on your post, it strikes you – you haven't checked if the API you use indeed takes that named parameter. You now check, and it doesn't! So you modify the call, and now everything works.
You feel a mix of euphoria and disillusion: "How can I be so dumb that I haven't checked this in the first place?" (Narrator: no, you're not dumb.)
Why does this work?
Describing the issue to others makes you think about it from all angles. Since you ask others for help, you also consider tiny, relevant details you might have missed. And for complex problems, it's almost always the details that matter.
It seems odd that you have to put it in writing for this to work, but I've found that it's a strict requirement. Writing cuts out the fluff and makes your thinking structured.
Still need the answer?
A lot of times, the problem persists after having written about it in exquisite detail.
No worries! You have now shown your potential benefactors that you've done your job of trying your best, and you gave them a crystal clear description of the issue.
Having done this, you showed respect and maximized your chances of getting an answer.
Have you found the answer?
So now you know you had to modify the call to the external API to make the code work. Great, now go ahead and post your issue and the solution!
Doing so, you help others who struggle with the same issue find the solution quicker. That other person might always be you, so you help your future self, too, to retain more hair.
You've done your work of making software development less frustrating!
In summary, this technique consists of:
- Writing things down makes you think clearer
- Describing the problem to others makes you think harder, as you don't want to seem lazy
- The written form is essential; your formulation becomes sharper and removes fluff
- If you didn't discover the solution, you've made it likely someone else will help you arrive at it.
- If you did, post it, too, to reduce the frustration of others with the same problem.
(This post will appear in the book "How to Become an Effective Software Engineer" I plan to write. If you're a junior developer, I'd love to talk to you very informally to make the book scandalously useful.)