Better Programming

Advice for programmers.

Follow publication

Member-only story

Why You Need Refactoring When the Code Smells

8 min readMar 2, 2023

Image by John Schnobrich on Unsplash

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.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Fabrizio Di Guardo
Fabrizio Di Guardo

Written by Fabrizio Di Guardo

A Computer Science engineer with a passion for new technologies. Happy to live in one of the most revolutionary moments in the history of mankind.

Write a response

I'd have added magic value, spaghetti code and ravioli code are the warnings in clean code. another one is build an abstract factory that works code wise

1