It’s one of those nights where I’m sitting at my desk after spending the majority of the day at the computer. This used to be the norm when I was younger, but now I try to keep my hours at my desk a bit more limited for a variety of reasons.

Sometimes, as we all know, work ends up keeping us up a little bit later and in places a little bit longer than we’ve anticipated.

Late Night Laptop

In this instance, I’m working to track down a bug I’ve been after for a better half of the day and it’s something I need to get done now because later will be too late.

There’s other work to do and this is something that needs to be shipped, anyway.

If you’re someone who writes any type of code for a living, then you know the feeling of programming frustration I’m talking about: It starts off at a level of looking forward to getting back into the code with a level of confidence thinking:

“Okay, I’ve had time to step away from it. I should be able to come at this with a fresh perspective.”

Because sometimes that’s exactly what happens isn’t it?

The Patterns of Programming Frustration

Programming is a funny thing because it’s simultaneously one of the most frustrating and most rewarding things you can do.

Though you may be solving a problem for someone, you’re also in the process of having to do so with an IDE, reserved words, variables, functions, possibly a compiler, and so on. And when a bug is found, it can be an exhausting exercise in locating it just so you can kill it.

First you think:

“No big deal. I’ve solved problems like this before. I’ve got this.” 

Then the hours pass and you start to feel drained and you begin to think something like:

“This isn’t working. Why isn’t this working? This should be working. I’m following the documentation for this API. Why isn’t this working?!”

And sometimes it gets to a point where you want to throw up your hands and say forget about it. But we don’t do that because we love it too much, right?

Letting the bug win means we failed – at least it feels that way – and no one likes that feeling especially if we have control over it. Squash the bug, I win; Lose the bug, it wins.

But didn’t we write the code that introduced the bug in the first place? It’s a weird, sick and vicious cycle, isn’t it?

Fight For The Elation

Then again, we love the feeling of elation that comes as soon as we find to bug, kill it, understand what caused it, and are able to ship working code.

Of course, there are a lot of things to love about programming but the feeling of elation when you get something working for the first time or after resolving a bug is one of the many reasons.

So if you’re someone who’s in the middle of something like this right now, try to keep said feeling of elation that comes with solving the problem in the back of your mind.

If nothing else, maybe that’s the motivation you need to help you resolve whatever you’re working on right now. I don’t know if it will make up for all of the frustration that you’re feeling, but it will certainly ease it.