Today... I tilted at work. I was implementing something that I imagined would be trivial. It was giving me more problems that I imagined it. And testing my changes was a pain in the ass because it was something that couldn't be testing on the local dev environment. So I would have to compile and deploy to one of our test machines which makes each attempt take that much longer.

I became annoyed and frustrated that shit wasn't working. What happened was I would fix each error line by line and retry. I wasn't really thinking. It was basically brute force programming where I just keep trying randomly shit and hoping that it works. Well, that might be an extreme description, but it was quite close to what was happening. See an error, fix the error. Build -> try. Each  time more incorrect shit would pop up and I just totally went on tilt. Build fail -> build fail -> more rage.

It reminds me of thinking fast and slow. Depending on the problem retrying repeatedly is a viable strategy. But in this case, I needed to step back and look at the way I was approaching the problem. I was getting tunnel vision and just being stupid. I was coding in javascript and instead of an assignment with the = sign I had the : from the array values thing. And instead of semicolons I had commas. Those type of mistakes. If I just paused to think instead of going on tilt, I wouldn't have wasted more time.

I'm frustrated that I didn't fix that crap yet. But I decided to just step away and take a break for now. When I'm on tilt... my ability just goes way down. Programming is something that should be done with cold hard logic. There isn't magic in programming (generally). Tomorrow, I'll ask someone to take a look at my code. It's probably something stupid and trivial. It's easy to get tunnel vision in programming sometimes, like how you do it in writing. You read the same sentence 10x thinking of how it should be, when in reality it's completely different. That happens with programming to so it's important to just take a break and go for a breather.

So many times, after taking a break and coming back to programming. I see the error right away and it was so easy to fix. The fix would take me less than 10 minutes. Something that I previously spent hours in frustration would only take 10 minutes. That's the power of a break... and the hours of frustration is the result of going on tilt. So - don't go on tilt.

tl;dr - take a break when you get frustrated debugging. It'll save you time in the long run