Every time I try to do this, I end up having to rip it all up anyway when the requirements change. As John Gall famously said:<p>"A complex system that works is invariably found to have evolved from a simple system that worked. The inverse proposition also appears to be true: A complex system designed from scratch never works and cannot be made to work."<p>Over the years, I've gotten much better at writing components in such a way that I don't end up painting myself into a corner and can easily add/modify functionality later.
"To implement the next step you are going to have to go back and dig up all that perfect code you have just finished writing..."<p>"This sounds nice, but nothing has really changed - we have just shifted the problem from the coding to the design stage."<p>Things have indeed changed.<p>- If I spend 4 hours designing something and then have to throw it away due to realizing the next piece of functionality doesn't fit in with the design, then I have to throw away 4 hours work.<p>- If I spend 2 weeks programming something, and the then have to throw it away due to realizing the next piece of functionality doesn't fit in with it, then I have wasted 2 weeks.
There is experimental evidence that computer programs are insteligently designed, as opposed to real lifeforms:<p><a href="http://blogs.discovermagazine.com/loom/2010/05/03/linux-versus-e-coli/" rel="nofollow">http://blogs.discovermagazine.com/loom/2010/05/03/linux-vers...</a>
All <i>systems</i> evolve, if they can change at all. Systems with intelligent actors (software, language, economics, etc) involve more factors than biological evolution does. Biological evolution is mainly through variation and selection. Intelligent evolution <i>also</i> involves borrowing (acquisition) from outside the "genome", planning of future changes, analogical reasoning between "lineages", and other means of generating and fixing variations.