Fred Brooks was right. You always have to throw the first one away.
I've been writing an IRC daemon. In Java. For absolutely no reason other than I felt like it. I was rocking along with it gradually, adding features, uploading a new jar file to sourceforge every month or so until I hit v0.17. 0.17 was missing quite a few vital commands, but it worked well with its two-thirds complete feature set. You could chat in private or run a channel.
Then I hit a brick wall. The problem was that in my rush to add features, I hadn't been leaving any supports behind me, and the moment I had to start tackling the complicated functions, it all started falling down around my ears. The code had become ugly. Every new feature I added was being hacked on, rather than fitting into a clean whole. I could easily have continued in this manner, but who wants to create something that's ugly? The program went several months without being worked on except in short spurts, during which I attempted to dig myself out of the hole I'd built, and just succeeded in losing track of which direction I was trying to dig. (Especially since I'd gone against all my XP instincts, and not coded any unit tests. (Bad boy!)
So today, I made the (probably foolhardy) decision to throw away just under 5000 lines of code and start again from scratch. I just wish I'd got the courage to do this earlier.