A Programmer's Pain: I lost all of my sanity debugging, but you don't have to :)
How to not go insane when code stops working
There’s this song I found a couple of days ago, called stupid horse
It’s about a guy
Who bets all of his money on a racehorse
And loses all of his money
And then kidnaps the horse (horse-napped?)
It’s a weird song, yes. But I liked it. Not because it was good but because it represented something:
The life cycle of a programmer
A picture of Shergar: a horse who was kidnapped and had a 2 million dollar bounty to retrieve. Why? I have no clue
When we program, we bet the next couple of days of our dedication on one language we may not know well, a faulty dependency that’s not maintained anymore, or a framework with a trashy developer experience.
We bet it all, and we usually lose it all. Yep, I’m talking about the hellish times we spend debugging.
Just like the guy from this song, we bet our sanity on programming, and it’s usually gone by the end of the debugging session. I don’t know about you, but this makes me rage quit programming sometimes
Sometimes it’s just me banging on the table, other times I’m punching holes in the wall and screaming and my parents are outside my room wondering if I need a therapist (basically my version of kidnapping horses)
Debugging code makes people angry and frustrated, it’s just how it works. But learning to get around this frustration can make you a 10x better programmer
And the good thing is, you can start with just a couple of quick changes in the way you work
And no, I’m not going to suggest any meditation or deep breathing bullshit. Just simple, actionable tips.
Tip 1: give up (temporarily)
You read that right. Sometimes, it’s best to just give up. But not forever. Just shut down your laptop and walk outside. Play a sport, talk with your friends, or just touch grass :). Anything to put your mind off that one bug will make you more focused when you get back
Maybe it can inspire you to come up with a solution to your problem after!
Tip 2: Hop on social media (in a good way)
Now it’s really important when I say this: this doesn’t mean just scroll through your feed endlessly. But it’s interaction with a specific community. Maybe it’s talking with your colleagues or friends online, or making a quick post about how you’re feeling. Just make sure you don’t get too attached and fall down the attention trap.
For me, I love looking through #buildinpublic on Twitter. Seeing hundreds of people starting their startups is a pretty easy way to get inspired and get your confidence back.
Tip 3: get a punching bag
No, I’m serious. It sounds stupid but it’s a great way to get rid of frustration. Not just a punching bag but any form of workout. Put on your favorite music and go on a quick jog, or maybe a quick lifting session. Music + workout can take your mind off anything and put you back into a good state
A public punching bag in Manhattan: even all the angry New Yorkers let it out on punching bags when they're stressed..
Frustration is one of the unavoidable side effects of programming. But if you can control that frustration, you can work 10 times harder without feeling exhausted. If you’re feeling pissed, just throw in one of these tips. Take a break, see what your friends are doing, talk with your family, or just punch the air (or a person, although not recommended ;)
We all bet our sanity on programming, and we usually run out of it after a couple of hours of debugging. It’s unavoidable to be frustrated, so finding quick ways to manage it will get you much farther.
Thx for reading! This is my first newsletter I’ve ever written and I’m not that great of a writer, so leave some feedback please! tysm :)