I guess every programmer was once part of a Death March project. Here in Brazil, I think Death March projects are the norm, given the common tendencies of managers to underestimate the time it takes to develop applications, and the huge competition caused by restricted markets in some cities. Consequently, things fail, mistakes are made, and delays accumulate.
Today, I finally left this stage in a project I’ve been working on, and I can now believe the situation is under control. The last three weeks were a chaotic mix of long hours, little sleep, and too much despairing. The extended holiday I was dreaming of disappeared amidst unending lines of code.
This project, to tell the truth, wasn’t that big. But internal flaws magnified the problems, and incorrect decisions about them let the application in a brittle state where it was unable to cope with some scenarios it was intended to deal with.
The only solution was refactoring, which was what I did. Code endlessly reproduced all over the application by way of Copy & Paste Programming was refactored into methods. 800-line long methods were trimmed to 50 lines or less by the use of strategic sub-routines. In two weeks, the code stopped looking like a mess, and became readable. I finally believed things would work out well in the long run.
So the story has a happy ending because the client tested the system and, except for a couple misunderstandings, the code worked. No show-stopper and no inconsistencies. And I lived for another day.