Instead of preparing for possible future requirements we should strive to make the code easy to understand. THEN if the need arises to change it, that becomes easy. Not because the code was designed to handle possible future use-cases, but because it was designed to be easy to understand, and thus easy to modify without causing more bugs.
If it turns out the possible future user-cases never materialize, we still benefit from the easy to understand code when we need to fix bugs in it.
There are two different types of reuse:
a) Supporting multiple use-cases of the same code, with different parameters.
b) Modifying the code to do something else than it does currently.
If the code is easy to understand it is easy to change for both cases. But if you try to make it ready for multiple use-cases from the start it becomes much harder to change it since it is already more complicated than it needs to be, to support just the initial user-case.
There is no Silver Bullet. Code is our tool for dealing with complexity. But it does not remove complexity. And more code you create more complexity you will have.
If it turns out the possible future user-cases never materialize, we still benefit from the easy to understand code when we need to fix bugs in it.
There are two different types of reuse:
a) Supporting multiple use-cases of the same code, with different parameters.
b) Modifying the code to do something else than it does currently.
If the code is easy to understand it is easy to change for both cases. But if you try to make it ready for multiple use-cases from the start it becomes much harder to change it since it is already more complicated than it needs to be, to support just the initial user-case.
There is no Silver Bullet. Code is our tool for dealing with complexity. But it does not remove complexity. And more code you create more complexity you will have.