volume_mute

When Code Cannot Simply Be Refactored

publish date2026/06/24 21:27:38.730164 UTC

volume_mute

What might be necessary if you take over a program for maintenance whose structure has been significantly degraded, beyond what simple code-level refactoring can fix?

Correct Answer

Design refactoring, which involves identifying relevant design patterns and replacing existing code with code that implements them

Explanation

If a program's structure has degraded too significantly for simple code refactoring to help, design refactoring may be required. This involves identifying relevant design patterns and replacing existing code with code that implements those patterns, which is typically a more expensive and difficult undertaking.

Reference

Software Engineering, Ian Sommerville, 10th edition


Quizzes you can take where this question appears