In frustration, many programmers are fond of saying “there is never enough time to do it right, but there is time to do it over”. When prototyping became the fashion, the saying was turned around to “if there is time enough to do it over, there is time to do it right”.
I needed to rewrite some code that I wrote several years ago this week. I was surprised at how much I could improve the code as I rewrote it.
- I changed common code into functions.
- I applied some new techniques and routines
- I consolidated several programs with similar functions into one program with parameters
The system now does much more than it did before, and the code is much more elegant.