How can I say, it is called Speculative community .
Causes of the problem: Sometimes code is created “just in case” to support expected future functions that will never be implemented. As a result, the code becomes difficult to understand and maintain.
As Steve McConnell says in Code Complete - 2,
Programmers are notoriously poorly guessing what kind of functionality they might need sometime.
<sub> 1. The requirements are not known, so the programmer must guess: Incorrect guesses mean that the code must be thrown away.
<sub> 2. Even a rough guess will be wrong in the details: These subtleties undermine the programmer’s assumptions - the code should (or should) be thrown away.
<sub> 3. Other / future programmers may suggest that speculative code works better or is more necessary than it: They create code based on speculative code, adding to the cost when speculative code needs to be deleted or changed.
<sub> 4. Speculative commonality adds complexity and requires more testing and maintenance: This increases cost and slows down the entire project.
Credits: code completed - 2 | Pluralsight refactoring course .
source share