5 Tips For Breaking Through Coding Frustration

Jeff Spagnola
Feb 21 · 6 min read

A handful of fun tips for getting over the hurdle of code frustration.

We’ve all been there. You’re staring at the screen for what feels like an eternity and you feel your blood start to boil as you receive yet another error message on a block of code that you just can’t seem to figure out. It’s like when you’re playing a video game and you’ve been stuck on the boss battle for hours…and somehow you’re actually getting worse! Is there a more frustrating feeling?

In our field, this phenomenon is known as “programming frustration“, and it can be one of the toughest parts of completing a coding project. It’s what fuels your imposter syndrome and leaves you feeling like maybe it’s time you get your real estate license or something. Personally, I seem to get into once of these head spaces once a week and maybe more if I’m working on a particularly tricky project. Over time, I’ve figured out a few methods that I use to help ease the pain and get me over the hump and on to the promised land of project completion.

Also, everyone’s different. The things that work for me may very well not work for you. However, I just wanted to give a little insight into how my weird brain works and hopefully some you can also find something useful here. With that being said, here are my 5 tips for breaking through the cloud of frustration.

1. Acceptance

As they say in support groups, the first step on the road to recovery is admitting that you have a problem. One of the things I have to constantly remind myself of is that running into coding roadblocks is just part of the process. Frustration is normal and it’s a part of the gig that needs to just be accepted. At times, the imposter syndrome can feel huge but you have to remember that you’re doing things that not many people are capable of and that it’s not only okay to fail, it can be great to fail! How many times has running into a particularly annoying error caused you to learn something new or inspired the use of a new skill or tool or package…or even a totally new outlook on how the language works in general?

Frustration is annoying. We all hate the feeling and we wish it would just go away. However, we can learn to accept the fact that we will get frustrated on a fairly regular basis and that we can use this feeling as fuel for new ideas. It’ll take some time, practice, and a bit of a change in your internal monologue but eventually, you can get to a place of acceptance with your code frustration.

2. Step Away

Earlier I mentioned the example of not being able to beat the boss in a video game…and actually feel like you’re doing worse with each attempt. Everyone who’s ever played The Legend of Zelda: Ocarina of Time can attest to this at one point or another. The concept of trying to just grind through it and keep on pushing until you’ve beaten the boss is one that is super tempting…and also, truthfully, not without some merit. You shouldn’t allow yourself to quit too easily. However, there is definitely a point where it makes sense to get up, step away from the game, and come back to it later on.

Your coding project is no different. Think of the problem that you can’t seem to get past as the boss and think of the hours of code that doesn’t seem to work as the attempts to beat the boss. Trying to grind through the issue and push yourself to the point of frustration actually has a negative impact on your ability to perform. This level of frustration affects your brain’s ability to think clearly and can put you in a bad state of mind in terms of being able to come up with actual solutions. The best bet is to not even allow it to get to this point. When you feel the frustration starting to set in, it’s time to step away. This allows you to be able to regroup and come back with a fresh state of mind.

3. Get Some Exercise

It’s no secret at this point that there’s a myriad of benefits of exercise, but some people often neglect the benefit that exercise has on stress relief and cognitive function.

Even just 20 minutes of rigorous exercise improves blood flow to the brain, reduces inflammation, and lowers levels of stress hormones. In some cases, this can be a bit of a quick fix to get your mind going again and relieve some of the stress and anxiety that you’ve been feeling about your coding problem. The benefits increase if you make this a normal part of your routine as regular exercise has been shown to boost memory and cognitive function as well as improve your mood and the quality of your sleep. Improving the quality of your sleep also adds a whole slew of other cognitive benefits.

So when you’re feeling extra frustrated by those incessant errors, get up and move a little bit. The exercise may be able to help you work through the problem.

4. Allow a Mindless Distraction

Don’t try to google “people showering” for your blog.

You know that thing that happens when you’re in the shower and all of a sudden you come up with the best idea you’ve ever had in your life? No, the shower in your home is not actually a beacon for creativity and high-level thought. Research has shown that you’re more able to tap into your inner creative genius when performing some sort of monotonous activity.

Activities like showering, driving, cooking, exercising (ahem…see above), or even something relaxing like fishing has the ability to basically put your brain on autopilot. When your conscious mind is in this state, your subconscious is allowed to wander freely and will often begin to come up with sparks of genius while not otherwise saddled with dealing with thinking about what’s going on.

So when you step away from your coding problem, try to engage in a mindless activity.

5. Look For a New Perspective

When I’m beginning to work on a project, I will typically put together an outline first. I will sketch out how I’ll be attacking the project in terms of how I’m going to process data, what technologies I’m going to use, the models I’ll be using, and a whole slew of other things. This gives me a solid plan before getting down to business. Great idea, right?

Sometimes, when I start running into issues (and I always do), I wind up developing tunnel vision and don’t seem to even consider deviating from the plan that I put together in the beginning. If my block of code doesn’t work, I’ll continue to try to make it work until I either have a functioning code block…or that frustration begins to set in.

The reality is that, as we all know, there’s an almost endless supply of ways to solve a particular problem. There’s no reason to keep yourself tied to something just because it’s what you planned to do or it’s the way you want to do it. Step away, move on from what’s giving you a problem, and come back with a fresh perspective. Maybe it’s a matter of using a different technology. Perhaps it’s a matter of processing the data a bit differently so it plays well with things later on. You can apply this logic to really any aspect of your project and you’ll wind up spending more time working on solutions and less time trying to fit square pegs into round holes.

If you happened to make it this far, thanks for reading! Please feel free to leave a comment and let me know what you think.

Learn and Grow

Read, Lead, Succeed

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store