Ignore the mess or re-write sloppy code?

Like all developers and web designers out there, I often get handed some legacy code to work on. I’m perhaps being too nice with the term ‘legacy’, let me try again. Sometimes I get handed the most sickeningly bad, amatuer, non-sensicle, written by demons in the shittiest part of hell code (yes…that’s more accurate). The dilema is often what to do about it. The purist in me wants to “scorched earth” it and write it properly. Now that my name has been associated with it, I’m not going to get tarred with the same brush as the person who decided it was production ready in the first place.

The employe in me tells me that i’ve only got a fixed number of hours to get this job done and re-writing it is just not going to happen in the time allowed for the job. I can either patch it up and deny any knowledge of ever seeing it or i can re-write it, or at least re-write the worst of it in my own time so that future developers looking at it wont want to kick my head in. How do others deal with this scenario?

Posted via email from Mark McAulay | Comment »