Member-only story

Code Refactoring

Soumendra's Blog
3 min readMay 16, 2021

--

Refactoring is the process of changing a software system in such a way that it does not alter the external behaviour of the code yet improves its internal structure.” What does that exactly mean? I mean, we’re not changing how it behaves, so the code’s going to work the same way, but we’re going to change the inner workings of it a little bit.

- We refactor to reduce the complexity to add new features into the code.
- Easy readability
- Easy to enhance and add new features to the code
- Reduce the time it takes to debug an issue
- To improve the understandability of the code for non-authors like new programmers, delivery team or support team.
- To reduce technical debts (a piece of code written in a limited time thinking to redesign it in future)

When to stop refactoring:

- Taking too much time to refactor which is blocking other dependent applications and priority tasks
- There is limited to no ROI (Return On Investment), which is very addictive for developers.
- Refactoring is not same as redesigning the code. It is easier to start the coding from scratch than to refactor your own or somebody else’s code.

--

--

Soumendra's Blog
Soumendra's Blog

Written by Soumendra's Blog

AI Architect and Sustain Lead at PepsiCo

No responses yet