Speculative Generality
Speculative generality refers to code that is more abstract or general than it needs to be, often in anticipation of future changes that never occur.
Code :
![](img/speculativeGenerality-before.png)
Treatment:
Simplify the code to only handle the current requirements.
![](img/speculativeGenerality-after.png)