Is it never ok to throw out software?
Joel concludes companies should never toss out software.
I try to be a good little programmer and follow this rule. I’ve come into a five year old project that’s been run by one man. It is filled with anti-patterns and generally of poor design. Most of the problems are from the data layer with inline-dynamic SQL.
- Pro’s: Users are familiar with the
way this app works and comfortable
with it’s bugs. Requirements are
built out, but there are some
underlying issues which have caused
users to question the overall
reliability of the application. - Con’s: Anti-patterns, intense
coupling, inline SQL, impossible
data layer.
I could re-gather requirements and build using OO, design patterns, and modern .NET techniques to make this app. manageable and teamable.
In small applications, with problems such as these should we follow Joel’s advice?
This question may be thrown out for being subjective, but I find this to be of critical importance to my job as a programmer.
What Joel is getting at is that if you throw everything out and start from scratch, you are throwing out years of work without any guarantee that the rewrite will be significantly better than what you already have.
Instead of focusing on a rewrite, consider the practicality of refactoring one piece of your application at a time. Instead of inline SQL, perhaps think about creating a new data layer, perhaps based on a “better” approach such as LINQ. Then you could migrate over to that new layer one function at a time. In this manner you will move forward towards your goal of a better code base, without having to throw away years of previous work.