Member-only story
Why You Need Refactoring When the Code Smells
Symptoms to detect something in your code is wrong
Developing complex software in a large team is amazing, a continuous professional challenge that can only be good for a developer’s personal growth. However, it is often easy to run into a situation where you feel something “stinks,” a symptom that something in the code you are reading is wrong, and may soon explode into a bug or slow down the implementation of new features or maintenance.
In such cases, there is only one way forward: refactoring.
Refactoring does not mean making code “prettier,” but improving its design with the ultimate goal of simplifying (and thus speeding up) the entire software development process.
“Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure.” cit. Kent Beck, see [1]
Code smells are not necessarily bugs but make the code harder to read, test, and modify. If you ignore the code smells, they can accumulate and lead to technical debt, which is the cost of maintaining and updating poorly written code. The longer you wait to address code smells, the more expensive it becomes to fix them.