I find programming to be one of the singular most frustrating tasks I've ever done. There is absolutely nothing that makes me want to break things as much as a bug that won't go away. That you chase and chase and it never seems any closer to you.
What I'm learning is that when you chase something and it doesn't get any closer, you're chasing the wrong thing. I'm now sure where or how or why I learned that the thing to do is to just continue chasing, chasing, chasing, but as I've gotten nothing but more and more and more frustrated I've come to challenge my base assumptions.
Why do I insist that the thing be done that way that isn't working? Because it "should" work that way.
In the end it's a question of value, do I value my sanity more than my desire to be right? To see my previous idea of how something might work be proven right? Because all the evidence is clear - back up, sit down, and try a different way tomorrow.