From: Devin Mullins Date: 2005-12-22T12:10:39+09:00 Subject: Re: unit tests == ugly code? Joe Van Dyk wrote: >I've found that when I write the tests first, and then write the code, >I'm not very concerned about what the code looks like. When the code >passes the test, I drink a beer and party, then move on to the next >test. > >Anyone else out there like me? Or should I be anal about writing good >code even with the tests? I guess that would be ideal, but I'd rather >get the functionality done first. > > Actually, my biggest problem for a long time was ugly *tests* (mostly from a desire to mock _everything_, and never to inject), but I'm getting better at that. No, you're going to have to stop, look at your code, and say, "Is this readable? If not, how can I make it readable?" Having passing tests will give you more freedom to do so, hopefully. Devin