After my own decade of enterprise programming i can there only two ways to obtain clean code. Either you build it right from the start, or you make a cleanup a blocking requirement before a high value feature can be added (which often requires a liberal interpretation of the word &#x27;blocking&#x27;).<p>I&#x27;m a fan of the first approach. Building it right is the most efficient way to build, with the overall lowest amount of effort required. It doesn&#x27;t mean gold-plating, rather the opposite: keeping things light, elegant and minimal. Anything that can&#x27;t be built cleanly isn&#x27;t built at all (yet), or at the very worst it is mocked with a fixed data implementation, which suffices for demos but not for shipping.<p>However, the problem with building it right is that you have to learn all the wrong ways to build before you learn how to stick to the narrow path of clean code. I wish we could do brain dumps from old hands to young wolves and not see the same mistakes repeated by every generation of programmers.