"One of the most important articles I’ve read on the c2 wiki wasn’t about a programming technique. It was PlayHurt. The core debate of the page is whether software developers can produce good code even when their hearts are not in it. Because development is a creative mental activity, it’s profoundly affected by the developer’s mental state.
...I felt terrible because I didn’t understand why I didn’t want to go to work in the mornings and why I had to push myself to fix every bug and complete every feature. I didn’t have the perspective or experience to recognize all the things I just listed that had gone wrong, so I felt like a failure because I couldn’t develop on command. I found some of that understanding on the wiki. I couldn’t Play Hurt anymore. I was just plain tired of being hurt. I quit that month.If you want to write good code, you can’t play hurt. If you want to be proud of your work, you can’t play hurt. If you want to feel you’re making something of your life, you can’t play hurt. The best work is powered by passion and meaning, not obligation. Play hurt if you’re getting through the occasional frustrations that every job has, if you need to pay the bills, if you’re setting up someone you like to do motivated work. But don’t play hurt if you can avoid it. Find something you love. Create something meaningful. Encourage an environment that allows people to work at their full potential. And take risks to do it."
It sometimes takes me a while to get back to full health, so to speak, but it's always the right decision to move on when you're feeling like this.