Refactor

Part of speech: verb

Definitions

  1. To revise and restructure existing code or text to improve clarity, efficiency, or organization without changing its external behavior
  2. To modify and optimize the internal structure of an object, system, or document while preserving its original functionality and meaning
  3. To reorganize and simplify the composition of content or programming elements to enhance readability and maintainability without altering its output or results

Etymology: The verb "refactor" is a simple compound: the prefix "re-", meaning "again" or "back," attached to "factor," an English noun that had been carried over from Latin through French. The Latin "factor" meant "doer" or "maker," an agent noun built from "facere," "to make" or "to do," and it reached English by way of Anglo-Norman and Middle English as a word for an agent or steward who acted on someone else's behalf. Over time "factor" came to mean something that contributes to a result, which is the sense that lies behind its use in mathematics. "Refactor" thus means to make again, or to remake something. In computing it describes restructuring existing code so that its internal design improves while its external behaviour stays the same. The programmer is not adding features but reshaping what is already there, so the prefix "re-" carries its original sense of doing something over.

Synonyms: restructure, reorganize, revise, recode, remodel

Antonyms: break, damage, corrupt