Refactoring is a technique where you changes existing code without changing the external behavior. Continues refactoring and improving code design makes the code cleaner and it´s easy to accumulate technical debt and refactoring is a great way to repay that debt.

Some advantages with refactoring is that it can reduce complicity, fixing bugs, improve maintainability, make the code design modern and easier to work with.

Best way is to “refactor” in many small changes, that over time accumulate to bigger changes and great positive effects. Small changes is a way to try to avoiding introducing new bugs when refactoring/redesigning the code.

Don´t skip this part in the development process, technical debt will rise fast if you don’t take care of the code and clean it. So try to plan ahead for refactoring or you will get what is called for “bad code smells”.

Some causes to bad code smells:

  • Bloaters

Code, methods and classes that have grown to big that there are hard to work with.

  • Dispensable

Is something that are unnecessarily and can be deleted without any effect on external behaviors.

  • Change Preventers

Is when there are too many dependencies so when you need to change something you need to make the same changes in other places too.

Read More:


Thanks to Jimmy Janlén for letting me use his pictures from Agile Topics Cards.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s