Successive Refinement¶
We should write a rough draft, then a second draft, then several subsequent drafts until we had our final version.
Writing clean compositions, they tried to tell us, is a matter of successive refinement.
bad code can be cleaned up. But it’s very expensive.
As code rots, the modules insinuate themselves into each other, creating lots of hidden and tangled dependencies.
Finding and breaking old dependencies is a long and arduous task.
On the other hand, keeping code clean is relatively easy. If you made a mess in a module in the morning, it is easy to clean it up in the afternoon.
Better yet, if you made a mess five minutes ago, it’s very easy to clean it up right now.
So the solution is to continuously keep your code as clean and simple as it can be. Never let the rot get started.