Skip to main content

Refactoring can be a dangerous word

Posted by jonathansimon on January 5, 2005 at 2:08 PM PST

I am on one of those projects where I try to introduce XP practices like lightweight documentation and testing. I also happen to work at a large wall street investment bank with alot of money at stake. And as a result -- a pretty stressful and politically charged environment.

One thing I've learned through this is to be extaordinarily careful about how concepts are applied and especially how terms are used. If you're not careful, people can get the wrong idea about these practices and will look down upon them in the future.

One example that comes to mind on my current project is the word "refactor" and how it was misused. At the start of the project, several services were written completely wrong and had to be rewritten. But the word "rewrite" is a politically charged word, and not very well liked.

This was about the time that I came in with XP concepts and presented some approaches to get things back on track. So people started using the word "refactoring" when they meant "rewriting" because it didn't have a political connotation yet.

I didn't really notice this was happening until it was too late. Now the word refactoring is often used to mean 'throw away code and write entirely new functionality' a very far leap from XP's view. I try to correct it, but it entered the collective conciousness as a better political term for rewrite and is now a word of its own.

Now I have to be careful when presenting other XP concepts, because if they use the word "refactoring" management sees more work than really exists because they think of it in the "rewrite" sense.

So, when you introduce concepts, be very careful to make sure they are not just understood, but applied in the correct context.

Related Topics >>