Member-only story

Developers: please stop using the term ‘Refactor’ if you do not run a good suite of automated unit tests before and after the change

Without the safety net of automated testing, it is just ‘code changing’, not ‘code refactoring’.

Zhimin Zhan
4 min readNov 29, 2021

I expressed this view (as the title) in a project meeting many years ago and I regretted it. Why? The statement is correct, based on the definition of Code Refactoring. However, it did no good to my relationship with the other developers in the team simply because they did not understand, and I was not in a position to influence them.

The Story

About 16 years ago, I left the position as a Lead Developer (in Java) and joined a large .NET project for two reasons:

  • learn a new technology/language
    influenced by classic the Pragmatic Programmer book, to try a different language
  • get better pay
    there was no shame to admit that, as a contractor programmer and a sole bread earner of the family.

There were a number of issues with the software development practices in this new project. For example, a configuration engineer (who managed the building of the software) once claimed excitedly: “It compiled!”. The project lead (i.e. PM), who worked…

--

--

Zhimin Zhan
Zhimin Zhan

Written by Zhimin Zhan

Test automation & CT coach, author, speaker and award-winning software developer. Help teams succeed with Agile/DevOps by implementing real Continuous Testing.

No responses yet