Refactoring
A product quality technique that reshapes a product's internal design to boost maintainability and other desired attributes while keeping its expected behavior unchanged.
Key Points
- Changes the internal structure without altering features or user-visible behavior.
- Performed in small, incremental steps throughout development or maintenance.
- Reduces technical debt and improves readability, testability, and adaptability.
- Most effective when supported by automated tests and agreed coding standards.
Example
During a sprint, a team improves the checkout module's code by extracting smaller functions, renaming confusing variables, and removing duplicate logic. No new features are added, and the checkout still works the same, but the code is easier to maintain and extend.
PMP Example Question
In an iteration, the team allocates time to restructure code to improve maintainability without changing how the application behaves. What practice are they performing?
- Refactoring
- Kaizen event
- Prototyping
- Spike
Correct Answer: A — Refactoring
Explanation: Refactoring improves the internal design to enhance quality attributes while preserving the product's external behavior.
HKSM