Why Refactor?
If you have ever seen a great chef cooking, you will see a pattern. Every couple of chops, every couple of minutes, the chef cleans up his station. He is almost maniacal about it. He is usually in the kitchen all day long and he wants it to feel like a good place to be around. He also knows that not doing this is a pandora box waiting to be opened and that it will effect the food quality.
For software engineers, our code base is our station. This is where we spent 8 to 16 hours a day. In my career, I have seen around 10 code bases and I know for a fact that team morale was much higher in a well maintained code base. It felt good to come to work and work on clean code base. Messy code bases are out there and they might be generating huge revenues. Yet, just like a messy kitchen, they will require great energy to find anything in them or to get anything good out of them. This is no environment for a chef, a software engineer or anybody to be in.
Software Engineering from the Frontlines Course on Maven
If you liked this article, I will be teaching a “Mastering Software Engineering” course on Maven where I will teach hard-learned lessons I acquired developing large-scale products at companies such as Uber, Airbnb, and Microsoft.