Alwyn Jose
blog-post-1

Is Refactoring Just Cleaning Up Code?

Through constant refactoring we will devise a clean code at the end, however refactoring is not ‘just’ cleaning up code. According to the definition of refactoring, it is a process of improving the structure of an existing code base without changing its external behaviour. This is achieved through small incremental changes implemented on the code without changing its functionality but turning it into a better structured code. And every time refactoring is done, it is usually followed by a unit test to check the integrity of the system. This is not the case for cleaning up code, as removing an extra comments in the code can be called as cleaning up.

References:

  • Fowler, M 1999, Refactoring: Improving the Design of Existing Code, 1 edn., Addison-Wesley