Had a long discussion this morning about code quality and the need to refactoring code.
You alwas need to refactor your code when you worked with your project for a while, it doesn’t matter if you plan your coding a lot. It’s better to focus on producing business value and refactoring continuously. If you worked that way I’am sure you will save time in the end comparing to put a lot of time to planning your coding. Of course you need to plan your coding, but don’t waste to much time on it, sooner or later you need to refactor anyway.
Don’t be afraid to refactor code when you find code that could be better.
When we discuss things like this, I use to point at the boy scout rule, read more on http://programmer.97things.oreilly.com/wiki/index.php/The_Boy_Scout_Rule