Happy Monday! Last week at work was excellent - I really feel like I was fully able to give myself the time and space to explore, investigate, and solve a few tough-for-me code issues, and that was a great feeling!
Something I was super conscious of during my time figuring things out was how supremely unpleasant it can be to feel like you're right on the cusp of figuring something out only to try a different solution and not have it work out.
From there, it's easy to spiral down into frustration and driving yourself insane by trying different iterations of the same ultimate solution over and over and over again with the same result.
So, during that time of resisting the spiral and opting instead for pushing forward, I also took a few notes that could help other developers on whatever problem is currently stumping them.
1. Get back to the basics of your problem.
I think when we're working through a tough issue, it can be easy to Tarzan-swing from post to post on StackOverflow with the hope of finding the perfect solution. While doing this can definitely help from time to time, and we might in fact find the perfect solution - I'm finding that this actually takes me further and further away from the most efficient way to find the solution.
Getting back to the basics of your problem means making sure you're understanding every single word of the story in the Trello card that was assigned to you or every single word of the GitHub issue or every single word of the helpful hint your teammate or manager gave you on your pull request.
More often than not, the right direction can be found right from those words, so get back to the basics and circle yourself around those hints before going on a StackOverflow scavenger hunt in the hopes that something (anything!) will miraculously pop out at you.
2. Read the docs.
If you're using another bit of software or an open-source tool within the code you're currently investigating, read through the documentation for a helpful hint around what your solution could be.
I don't think I'm the only developer guilty of just skimming a few parts of any documentation before throwing my hands up in despair and whining about there not being an appropriate explanation.
Really read the docs of any tools involved in what you're working on. Chances are - there'll be some helpful hints there to add to your investigative journey. Set yourself a 15-minute timer if you have to just to focus on truly reading through the documentation. I promise - it helps.
3. Ask questions.
As junior developers, I think it can be easy to get stuck in this weird limbo of not wanting to ask questions, and then thinking we should ask questions but then feeling a strange anxiety that you'll be criticized for waiting too long to ask said questions, and then it's just this cycle that has gotten out of control and no one's the wiser.
If you're really stuck, and you're driving yourself crazy in the meantime, ask for a hint. Your teammates will be happy to give their input. And you'll be a bit less frazzled.
4. Take breaks.
One of my favorite lines from Mad Men (and believe me, there are so many to choose from) is when Don tells Peggy "Just think about it deeply and forget it. An idea will jump out at you."
Sometimes too much focus can be, well, too much. Try working on something else or stepping away from the code for a bit. Don't worry - your brain will still be churning away in the background, but you'll be able to calm down a bit more and then come back feeling refreshed and wondering why there's an idea jumping around in front of you.
5. Celebrate your success!
Once you find your solution - and you will - celebrate your hard work!
That sheer rush of dopamine is what everyone's talking about when they say that coding is the best thing in the whole world. It's that crushing frustration paired with the soaring euphoria of solving your problem.
Before moving on to your next thing, stop and celebrate and feel proud of yourself. You did it and you overcame those obstacles.
Plus, it's important to cherish that rush of happiness before starting all over again and going through the same hurdles as before.
Hope this helps! I think it's good for juniors, but I suspect it could also work for developers at any level since there are always challenges to solve and overcome, no matter what.
Cheers!
P.S. I send weekly newsletters via email about the self-taught coding journey and my own coding adventures (and misadventures!) Sign up here if you want in on that! >>
Top comments (2)
Try explaining the problem to your rubber ducky - en.wikipedia.org/wiki/Rubber_duck_...
Thanks for sharing the great and helpful content. Currently, I am at the beginning stage of my web development career and it helps a lot. Thanks. Keep Coding..