Knowledge
Search knowledge... ⌘K
Knowledge · Anti-Patterns
Smell Lazy Element
Code smell indicating program elements that are not earning their keep (updated from Lazy Class)
Tags
refactoring-fowlercode-qualitymaintainabilitycode-smell2nd
Impact
We like using program elements to add structure, making it easier to express meaning. But sometimes the structure is not needed, perhaps because a once-planned capability never materialized, or through refactoring that removed most of the logic. Such elements need to die with dignity. When they are not doing enough to pay for themselves, they should be eliminated.
Symptoms
- We like using program elements to add structure, making it easier to express meaning. But sometimes the structure is not needed, perhaps because a once-planned capability never materialized, or through refactoring that removed most of the logic. Such elements need to die with dignity. When they are not doing enough to pay for themselves, they should be eliminated.
Source
Martin Fowler — Refactoring: Improving the Design of Existing Code, 2nd