Clean Code Mastery workshop
View the Project on GitHub DomainDrivenDesignSchool/CleanCodeMastery2026
← Home
Related Docs
Not all code smells are equal.Some silently destroy a system over time, while others are just minor annoyances.Refactoring everything at once is neither realistic nor desirable.
This is where the Impact / Effort Matrix becomes essential.
The Impact / Effort Matrix is a prioritization tool that helps us decide:
Which code smells must be refactored immediately
Which ones should be planned
Which ones can be postponed
Which ones are not worth fixing (yet)
Each code smell is evaluated along two dimensions:
DimensionDescriptionImpactHow much the smell damages readability, maintainability, extensibility, or correctnessEffortHow costly it is to remove the smell (time, risk, complexity)
See: → Design by Contract
High Impact ↑ | Quick Wins | Strategic Refactors (Fix Immediately) | (Plan & Schedule) | ------------------------------------------------→ Effort | Low Priority | Avoid / Defer (Accept for now) | (Not worth it now) | Low Impact
These smells should be fixed immediately.
They:
Cause real harm
Are easy and safe to fix
Deliver instant improvement
Examples:
Long method with obvious extraction points
Duplicate code in nearby classes
Poor naming (variables, methods, classes)
Magic numbers with clear meaning
Rule:
If it hurts and it’s cheap → fix it now.
These smells:
Seriously affect system health
Require significant design changes
May involve multiple modules or teams
Examples:
God Object
Tight coupling between layers
Large conditional logic replacing polymorphism
Core domain logic mixed with infrastructure
Rule:
These deserve planning, not impulsive refactoring.
Actions:
Create technical debt tickets
Schedule refactoring milestones
Protect with tests before changing
These smells:
Are easy to fix
But don’t meaningfully improve the system
Examples:
Minor formatting inconsistencies
Small methods that could be merged
Slight over-abstraction with no real cost
Rule:
Fix only when touching nearby code.
These are dangerous traps.
They:
Take a lot of time
Introduce risk
Provide little real value
Examples:
Refactoring stable legacy code with no change requests
Over-engineering for hypothetical future needs
Rewriting code just to match personal taste
Rule:
Not all smells need refactoring.
Clean Code defines what good looks like
Code Smells tell us where to look
Impact / Effort Matrix tells us what to fix first
Refactoring is the execution mechanism
Clean Code is the goalCode Smells are signalsRefactoring is the actionThe Matrix is the decision system
Refactoring is not about perfection.It is about maximizing value while minimizing risk.
This matrix keeps refactoring intentional, practical, and sustainable.