Learn English – verb “refactor” meaning “doing refactoring” in English

is-it-a-wordorthographyword-usage

Code refactoring consists of changing the structure of the code without changing its functionality. The term refactoring is currently used by software development industry to refer to this process.

But what about the verb refactor? Does it exist in this context? Can I say, for example:

After two weeks, I finally refactored the code of this library.

or:

Tell the management that we can't work on the spaghetti code like this. We must refactor it first, which will take a few months.

By the way:

  • Microsoft Word spell checker accepts the term refactoring, but considers refactor as a mistake, suggesting refractor, which has nothing to do with refactoring.

  • Wikipedia avoids using the verb refactor and prefers using combined terms as perform refactoring.

  • When searching for pages containing refactor but not refactoring, the first results are either using refactor as a proper name, like a name of a product, or have nothing to do with software development.

  • Other sources are not helpful. Spell checker in Chrome considers refactoring as an invalid word. The same is the case with Google Translate and several other online translators.

Best Answer

This is most likely a case of dictionaries having not caught up with an industry's lingo or jargon. Here are a few examples of using refactor:

You can also refactor other things besides formal expression languages. Like DocumentRefactoring. I refactored this definition several times in order to group similar ideas into their related paragraphs. Of course, I call that reorganization. It's all similar (except where it's different). (source)


Refactor mercilessly to keep the design simple as you go and to avoid needless clutter and complexity. (source)


For example, if a programmer wants to add new functionality to a program, he may decide to refactor the program first to simplify the addition of new functionality in order to prevent software entropy. (source)


These examples were found with ten minutes of searching.

In addition to the above, my own personal experience around programmers suggests that every single programmer who knows what refactoring is will understand what refactor means. Furthermore, Visual Studio's refactoring menu actually calls it refactor:

enter image description here

Related Topic