This old debate again? I suppose it's been a while since I've argued it, so I might as well jump in. :-)<p>It's incredibly naive to say that crappy code that gets the job done is generally good. Ok, sure. Sometimes you just have to roll up your sleeves and write an ugly hack to get the job done. But if you keep it up, you spend more time maintaining the ugly hacks than you do coding new stuff.<p>So here's my advice:<p>1. Stop. <i>Breathe</i>.<p>2. Think about what you're doing before you do it.<p>3. Do it.<p>This has worked wonders for me. It's incredible how easy it is to not write crappy code, and it pays off. And for the record, I'm one of the biggest instant gratification junkies I know. I'm not saying one needs to write good code because I don't want to get things done.
I think a lot of people in the "I hate crappy code" camp tend to spend too much time trying to fix seemingly crappy code, time that arguably would better be spent fixing other, more important bugs.