Knowledge
Search knowledge... ⌘K
Knowledge · Anti-Patterns
Smell Speculative Generality
Anti-pattern indicating need for refactoring
Tags
refactoring-fowlercode-smellmaintainability
Impact
Hooks and special cases added because 'we think we might need this someday'. The result is often harder to understand and maintain. If the machinery isn't being used, it isn't worth it.
Symptoms
- Abstract classes that aren't doing much
- Unnecessary delegation
- Methods with unused parameters
- Methods with odd abstract names
- Only test cases use certain methods or classes
Source
Martin Fowler — Refactoring: Improving the Design of Existing Code, 1st Edition (1999)