in Programming

In Praise of Refactoring

When developing new ideas, software, content, or processes, refactoring often follows the nascence of a creative solution. Refactoring is immensely valuable, yet it has taken years as a professional Web developer for me to realize how important this task is to the long-term viability of my work. Even though the idea of refactoring is borrowed from programming, it applies equally well in most creative endeavors.

Code Refactoring

When brainstorming new ideas, refactoring can make up the difference between a surface solution to a single problem and a deeper solution that addresses an entire class of issues at once. In software, programmers can produce a project that needs to be scrapped in order to go forward, or they can refactor and make something that can be extended to provide new functionality. When a writer creates new content, refactoring provides the finished polish that engages the reader’s attention. In business, entrepreneurs carefully evaluate and tweak their new business processes until they are sure their customers are being served effectively. Refactoring is valuable. Why do we resist it?

In short, we are lazy thinkers. I’m taking the liberty of assuming my readers also have this fault. We believe that simply bringing a new idea into reality should be praiseworthy. Indeed, creating anything new is a valuable and remarkable act. And, on a practical level we do right to shy away from refactoring. It is often done at the wrong time. Nothing short-circuits the creative act like the intrusive criticism of an overzealous inner editor before a solution is well-formed.

Yet in spite of the risks, even the most creative genius needs to recognize when he is done creating something new and the inner editor can be set free to refactor and improve his idea. We must embrace this because there is a significant gap between the birth of an idea and the implementation of something new and useful that can make a mark on the world. Refactoring removes the rough edges of your creative work to let its true value show. It makes your work applicable to a broader range of problems. It seems to me that the simple process of refactoring – looking at your idea from all sides and making small improvements after it is “finished” – may step up the quality of your work and take you all the way from mediocrity to excellence.