The ancient Greek philosopher Heraclitus is famous for positing that “Life is flux.” In other words, change is inevitable, and to resist change is to resist the essence of our existence. Perhaps nowhere is change more pronounced than in the software industry. Due to changing customer requirements and shifting market conditions, software is guaranteed to change. If not actively maintained, software degrades over time. Refactoring and testing are steps that developers take to keep software current.
Refactoring is the art of improving the design of code without changing existing behavior or adding new functionality. Benefits of refactoring include the following:
- Maintainability—The ability to quickly fix bugs and address problems faced by customers.
- Extensibility—How easy it is to add new features. If your software is extensible, then you are more agile and able to respond to marketplace changes.
- Reusability—The ability to remove duplicated and highly coupled code. Reusable code is readable and easier to maintain.