Culture of refactoring

varuna srivastava
2 min readAug 24, 2021

Hello everyone, If you want to experiment and encourage the refactoring culture for your product without fear, you would get a broad idea end of this article. We would explore how to have a healthy work culture on refactoring.

I have seen in past whenever we hear in standup mid of the iteration that this core component needs to be refactored to accommodate the new feature, there is a sense of discomfort among team members questioning

  1. Why now?
  2. Is it must have?
  3. Can we plan well in advance?
  4. How much it is going to have a regression impact?
  5. Does the iteration velocity would get impacted and so on

I draw a parallel of refactoring with arranging a wardrobe until and unless you clean it frequently you would not know what is in and how new clothes can be paired with existing ones. So how to move the needle of the team from the discomfort zone of refactoring to be confident and cultivating the culture of refactoring in teammates

  1. As a team note down the concerns and discomfort from across the roles. Evaluate the impact of concerns and draw a matrix around them. Prioritize your low hanging fruits to gain confidence.
  2. Once team members are onboarded start small and make sure we have a team to support each other if anyone fails. Fail fast to fly high.
  3. Make a refactoring habit as a part of your story/feature development. If you are touching some area and noticing a scope of refactoring, do it then and there as tomorrow never comes. Broadcast it in your team meetings to a wider audience so if people have any inputs that can be addressed.
  4. As you own quality of your product own a refactoring too as it has a good impact on your product in a non-functional manner if you have optimized and refactored a database query it is definitely going to enhance the performance of your application.
  5. Make impact visible to the stakeholders so they know what value it adds to the product, so next time you are refactoring you are not getting push back on the same.
  6. Don’t limit to code it plays an equal role for test automation code
  7. Reflect and Raise the bar

What is refactoring: Refactoring is the activity of improving the internal structure of a code or component without changing its external behaviour.

--

--