When we work on a project as a developer our main focus is to write code and complete the requirements of the modules given to us, once we are done we just call it a day, when the other developers try to refer the module we develop they are clueless most of the time and the worst part we ourselves forget what we did and what a particular line of code is supposed to do.
In Agile software development we follow practices like Test Driven Development(TDD), Refactoring to address this kind of confusions, Refactoring is a disciplined technique for restructuring an existing body of code, meaning altering its internal structure without changing its external behavior. When we try to implement a functionality for the first time we are focused to achieve the result, that's totally fine but if we spend a little more time following the guidelines of what TDD and Refactoring says we can save a lot of time in the future and we will be thinking about adding features instead of working on the bugs.More...