Виртуальная песочница (тм)

Tuesday, January 31, 2017

Rewrite from scratch

A "quote-style conspect" of the (IMO) main points from the famous article by Joel Spolsky.


the single worst strategic mistake that any software company can make: [..] rewrite the code from scratch
[..]
We’re programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We’re not excited by incremental renovation [..] There’s a subtle reason that programmers always want to throw away the code and start over. The reason is that they think the old code is a mess. And here is the interesting observation: they are probably wrong. The reason that they think the old code is a mess is because of a cardinal, fundamental law of programming:
It’s harder to read code than to write it.
[..]
When you throw away code and start from scratch, you are throwing away [..] knowledge. All those collected bug fixes. Years of programming work.
[..]
problems can be solved, one at a time, by carefully moving code, refactoring, changing interfaces [..] Even fairly major architectural changes can be done without throwing away the code.
[..]
when you start from scratch there is absolutely no reason to believe that you are going to do a better job than you did the first time. First of all, you probably don’t even have the same programming team that worked on version one, so you don’t actually have “more experience”. You’re just going to make most of the old mistakes again, and introduce some new problems that weren’t in the original version.

No comments: