Skip to content
ARCHIEENGLISH
LearnPlayWordsRanking
  • Learn
  • Play
  • Words
  • Ranking
  • Mine
← Vocabulary

refactor

verbC1Very rare — outside the 30,000 commonest English words, so you will meet it in writing rather than in speech — factor sits at #2,991Too rare in one of the two pools to compare — fewer than 20 uses in speech or in writing

Other forms: refactoring, refactored

To refactor is to rewrite code so it reads better without changing what it does. Refactor the module, a large refactor, refactor before adding to it.

The behaviour staying the same is what makes it a refactor rather than a rewrite, and tests are how you know. Refactoring first is usually cheaper than adding to something tangled.

Definitions of refactor

  1. 1verbrefactorTo rewrite code so it reads better without changing what it does.C1

    “He spent a day refactoring before touching the feature at all.”

refactor is a rewriting.

Where it comes from

  1. Proto-Indo-European

    *dʰeh₁-

  2. Middle English

    factour

  3. English

    factor

  4. English, today

    refactor

Built from

  • factus · Latin — done or made
  • faciō · Latin — do, make

From re- + factor. factor comes from Middle English factour. Middle English factour, from Middle French facteur, Anglo-Norman factour, and their etymon Latin factor (“a doer, maker, performer”), from factus (“done or made”), perfect passive participle of faciō (“do, make”).

Etymology from Wiktionary, CC BY-SA

Practised in Computing & Code

Practise this word

refactor in the wild

  • Another potential goal for refactoring is improved performance; software engineers face an ongoing challenge to write programs that perform faster or use less memory.

    Code refactoring

  • Despite the availability of metrics intended to assess such attributes, developers often do not rely on them when making refactoring decisions due to concerns about its practical usefulness.

    Code refactoring

  • There are several code refactor techniques to flatten these hierarchies without compromising the overall behavior.

    Yo-yo problem

  • Similarly, such code becomes difficult to refactor or replace due to dependencies that arise over time, necessitating the maintenance of backward compatibility with the original, incomplete design.

    Lava flow (programming)

  • Rule of three ("Three strikes and you refactor") is a code refactoring rule of thumb to decide when similar pieces of code should be refactored to avoid duplication.

    Rule of three (computer programming)

1 / 2

From Wikipedia, CC BY-SA 4.0. These sentences were written by other people about their own subjects; they are here to show the word at work, not as anybody’s opinion.

Related words

the faciō family

officefact

refactor — used too rare to measure · point at the bar for the others