Also I learned a lot from my boss' refactorings. Before that I never would have imagined how far a good abstraction can be driven.
Even if other things may not be perfect (but what job is perfect in all areas), my boss knows the value of refactoring towards a stable and maintainable architecture while keeping a reasonable schedule for shipping.
If there are no tests, the team will waste a ton of time anxiously monitoring and reasoning about the messy code and the impact of their changes.
This way I'm able to quickly and confidently refactor as well as add to existing tracking code (web analytics).
It's very easy to get stuck in design hell and write yourself into a corner. It's much better to get something that does what you want, then you change it to do it how you want it to.
Though like others have mentioned, this requires an engineering culture that values the second part.
But essentially I agree with you, good writers use the same technique: write once, revise many times.
Good code, IMO, only exist after many refactors.
I don't usually pick an absolute, decisive side in the "what counts as engineering" debate, but this is the opposite of engineering.
Or they iterate designs and prototype manufactured products.
They do not stamp and accept professional liability for thrown-together designs that bosses want to prematurely push out the door into production.
They tell the boss to budget them what's needed, or go find some other sucker to stamp it.
I'm mixed on the pros and cons of professional licensing, but it does give PE's a great amount of personal authority in refusing to be a part of substandard work. Even to clients and bosses.
So what's the difference then between that type of iteration and the type of iteration you see commonly in software? It sounds like the main differentiator for you is "doneness" or something similar to that?
I am not a dev by trade (data analyst) but still love to work on problems solved in code.
A lot of the advice hit home, but what struck me was this part:
> Encourage engineers to get something end to end launched internally as quickly as possible.
This is something my boss never ceases to tell us. When we build something we shall strive to have some first small thing end 2 end done as soon as possible. Rough around the edges, not refactored, code being repeated - all fine. But it has to work end to end.
Because we can brush it up and make it stable later. Because when starting we only have a vague feeling for the problem space and we need to learn the lay of the land by navigating it.
I will always cherish this advice.