What is refactoring and what is the best approach for implementing it?
Refactoring is an iterative process whose goal is to transform existing applications according to modern software engineering quality criteria. When refactoring is applied to an application, the characteristics of the application are improved in terms of clarity, maintainability, and redundancy reduction, amongst others. Refactoring may involve small changes, such as changing variable or subroutine names, or it may require large changes, such as consolidating functionality into a single component or breaking apart an existing component into multiple components that more logically isolate functionality. The best approach to refactoring is to attempt to do so in small steps. This will help to ensure that the refactoring process does not introduce defects. Smaller refactoring processes, such as identifying poor variable names, may take only minutes. Larger refactoring processes, such as identifying functionality that can be consolidated (or separated) can take hours, days, or even weeks.