Oh, you apparently think that I'm living off charity and only write abstract examples ;)
No sir, I don't make those assumptions ;-)
What I'm saying is that it's very different, for example, to code a well thought-out CPAN library, than working on a large system with a team of coders at different levels, with time and money constraints.
I think that your comments refer more to design than to the process of coding. Refactoring by very definition is a continuos and disciplined process after the fact, so your assumption above is actually wrong and must not be confused with good design. Good design is paramount, and that is not in discussion.
Furthermore, to actually be able to refactor you must first have a solid set of tests so when you actually refactor, you can guarantee the same functionality that should have been pinned down beforehand.