Being a developer does not come without its heartache. We deal with complex requests, tight deadlines, and unforeseen variables (e.g. major change requests).
It's always good to have a few strategies in your pocket when dealing with these so you don't go full Homer and tear all your hair out.
So, let's get to the list...
This one isn't always easy to do when you're on a tight deadline, but more often than not it will help greatly. Most of the time the answer is right there in front of you, but you're just too wrapped up in the problem to see it. By taking a break it'll help you refocus and think about the problem with a different mindset.
I work from home, so some things I'll do are:
- Throw the ball for the dogs
- Have a shower (you'd be surprised how many good ideas are shower ideas)
- Go for a walk
For those that work in an office:
- Go for a cup of coffee/tea
- Go for a walk around the block
- Run a quick errand
Basically, just get away from the screen to clear your mind up a bit and consider new angles to the problem.
Similar to the above, this allows you to take a break from the problem at hand, but still get some other work done. Perhaps it's another feature or just some admin stuff that's been piling up. Stepping away from the problem should help you refocus.
Often called "rubber ducking", this method is as simple as talking out the problem to yourself. It forces you to stop and think about the problem aloud.
Similar to talking it out, writing out your problem helps you see it in a new light. Go through the problem and write it out step by step to help you visualize it.
And last, but not least, never be too proud to ask for help. Often the solution is right in front of you, but just requires another set of eyes or perspective to see it. Whether you seek help from your colleagues, community forums, or chat, this is a great way to work through a problem.
The above list may seem pretty straightforward and that's because it is. The main thing to remember is to just stop and think before you get overwhelmed and frustrated.
I'm sure we all have our own strategies to deal with the struggle. What are some of yours?
Happy coding! 🤓