A while ago I was given the task of updating and extending the functionality of a software project. I was given a year to make the needed changes working solo.
A month into development I came to the conclusion that it would take longer to change the existing product than to rewrite it from the ground up (a decision I now regret). I'd never attempted a complete rewrite so I talked with my boss about it and he was thrilled with the idea.
I'm a fan of agile development but had never had the opportunity to take advantage of all of the prescribed practices so when I set to work I tried to incorporate as many as I could. I didn't have direct access to the customer and my coworkers (non-programmers) knew the business domain but were already so busy they didn't really have time to participate in design meetings so I resigned to working in the dark and occasionally calling one of them over to my desk to get feedback on my progress. I used TDD and refactored mercilessly and even tried taking a domain driven design approach. Things went well for a while.
As the deadline came closer and the complexity of the project grew my productivity start slipping. I found myself cutting corners and ignoring the practices I had established as the pressure increased to meet the deadline (basically the same things that had resulted in sad state of the previous version). I also started working late nights and weekends to keep up with the load.
In the end it made little difference how hard I worked. The project missed its deadline and what was completed wasn't enough to give to the customer. I had failed. Not only had I not finished on time but the previous version had sat untouched for almost a year so it wouldn't be of any help. Luckily we had another product that offered some of the same functionality. My boss decided to cancel the project entirely and moved all our orphaned customers to the other product. I spent weeks (along with everyone else at the company) manning the phones providing technical support for those customers. After it was all over, my boss was gracious enough not to fire me for nearly ruining the company. I was moved to the other product and have been trying to redeem myself ever since.
Where did I go wrong? Has anyone else had to deal with this kind of defeat? How did you recover?