volume_mute
Refactoring — Purpose and Practice
publish date: 2026/06/04 05:56:9.986509 UTC
volume_mute
What is refactoring in XP, and why does incremental development make it necessary?
Correct Answer
Refactoring means constantly looking for possible improvements to the software and implementing them immediately — this counters the tendency of incremental development to degrade software structure through code duplication, inappropriate reuse, and structural degeneration
Explanation
Incremental development tends to degrade software structure as code is often duplicated, parts of the software are reused inappropriately, and the overall structure degrades. XP tackles this by suggesting the software should be constantly refactored — the programming team looks for possible improvements and implements them immediately. Examples include reorganising class hierarchies, tidying up and renaming attributes and methods, and replacing code with library calls.
Reference
Software Engineering, Ian Sommerville, 9th edition
