Clean code that works, in Ron Jeffries' pithy phrase, is the goal of Test-Driven Development (TDD). Clean code that works is a worthwhile goal for a whole bunch of reasons.
It is a predictable way to develop. You know when you are finished, without having to worry about a long bug trail.
It gives you a chance to learn all of the lessons that the code has to teach you. If you only slap together the first thing you think of, then you never have time to think of a second, better thing.
It improves the lives of the users of your software.
It lets your teammates count on you, and you on them.
It feels good to write it.
But how do we get to clean code that works? Many forces drive us away from clean code, and even from code that ...