Skip to main content

Refactoring

Revising code to improve its structure without changing its behavior.

Also Known As

  • Code Cleanup
  • Code Optimization
  • Creating Abstractions
  • Factoring
  • Modularisation
  • Separation of Concerns
  • Technical Debt Management

Related

Addresses / Mitigates

Attendant Risks

  • Schedule Risk: Refactoring can be time-consuming and delay project timelines.
  • Implementation Risk: Done carelessly, refactoring can introduce new issues into the codebase

Used By

  • Extreme Programming: XP encourages continuous refactoring to improve the design of existing code and maintain its quality.
  • Scrum: Refactoring is encouraged to maintain code quality within Scrum.

Description

"Code refactoring is the process of restructuring existing computer code—changing the factoring—without changing its external behavior. Refactoring improves nonfunctional attributes of the software." - Code refactoring, Wikipedia

Refactoring involves revising and restructuring existing code to improve its readability, maintainability, and performance without changing its external behavior. This practice helps in reducing technical debt, enhancing code quality, and making the codebase easier to understand and modify.

See Also:

Used By

Extreme Programming

Extreme Programming

An Agile software development methodology that emphasizes customer satisfaction, teamwork, and frequent delivery of small, functional software increments.

Why: XP encourages continuous refactoring to improve the design of existing code and maintain its quality.

Scrum

Scrum

An Agile framework for managing and completing complex projects.

Why: Refactoring is encouraged to maintain code quality within Scrum.