Refactoring involves restructuring existing code without changing its external behavior or inputs/outputs, in order to improve the code's internal structure. It is done to increase a code's value by reducing technical debt and creating cleaner code that is easier to maintain. Refactoring's goals are to raise code quality both for short term goals like lowering costs, as well as long term sustainability.
Related topics: