At a high level, all software development–perhaps all invention–breaks down into three steps:
- Build it the way you thought it should work
- Do it from scratch the way you should have done it to begin with, as you learned during the previous step
- Optimize step 2 from scratch so you can actually ship it.
And of course, loop on steps 2 and 3 from then on.
Sometimes you’ve done step 1 so often, you hit the ground running with step 2, but not if it’s a new technology. And I can’t say I’ve always gone through all three steps for every project, but I’ve always wished I could.