refactor

Reorganize without changing

Refactor is a programming term for restructuring existing code without changing what it does.

The goal is cleaner, more efficient, or more maintainable code: We spent a week refactoring the legacy codebase.

The practice treats code as something that can be improved incrementally, like editing prose for clarity while preserving meaning.

code

restructure

Rearrange fundamental organization

decoupling · abstraction · encapsulation · methods · classes · functions · subroutines · interfaces · inheritance · polymorphism

quality

readability

Ease of understanding text

self-documenting · legibility · comprehensibility · cohesion · modularity · testability · extensibility · reusability · anti-pattern

process

reorganization

Changing how something's arranged

reengineer · redesign · streamlining · simplification · transformation · iteration · incremental · migration · modernization · cleanup

tools

IDE

Unified coding software suite

  • gitBritish term for fool
  • debuggingError removal from programs
  • diffFile comparison utility

merge · commit · branch · linting · static-analysis

Categories
Opposites
code change purpose

refactorextend

Make longer or larger

enhance · augment · build out · behavior modification

code quality trajectory

refactorkludge

Awkward but functional solution

cobble together · bodge · cut corners · make a mess · quick and dirty

development approach

refactorquick fix

Hasty temporary solution

hotfix · patch · fire and forget

Family

refactoring, refactored

Familiarity
Top 500,000
Profile
Used worldwide · Timeless · Abstract · Rated G