Those aren’t warts, they’re battle scars!
by Daljit Dhadwal
I can’t find where I originally read someone saying, “Those aren’t warts, they’re battle scars.” It might’ve been in the comments section on some software blog. The quote is in reference to how ugly source code often looks, especially code that’s been in use for a very long time. Back in 2000, Joel Spolsky wrote the definitive blog post on why code looks ugly and why there’s usually a good reason for it.
… you can ask almost any programmer today about the code they are working on. “It’s a big hairy mess,” they will tell you. “I’d like nothing better than to throw it out and start over.”
Why is it a mess?
“Well,” they say, “look at this function. It is two pages long! None of this stuff belongs in there! I don’t know what half of these API calls are for.”
Before Borland’s new spreadsheet for Windows shipped, Philippe Kahn, the colorful founder of Borland, was quoted a lot in the press bragging about how Quattro Pro would be much better than Microsoft Excel, because it was written from scratch. All new source code! As if source code rusted.
The idea that new code is better than old is patently absurd. Old code has been used. It has been tested. Lots of bugs have been found, and they’ve been fixed. There’s nothing wrong with it. It doesn’t acquire bugs just by sitting around on your hard drive. Au contraire, baby! Is software supposed to be like an old Dodge Dart, that rusts just sitting in the garage? Is software like a teddy bear that’s kind of gross if it’s not made out of all new material?
You can read the entire post at Joel on Software.