The key is to refactor in the right places — the places where you think you will need simplicity and flexibility in the future.
Managing Technical Debt
Carl Tashian
1.1K9

But you already correctly noted that one can never guess the future. What is the point of refactoring based on our guess of the future?

The best time to refactor is when you are implementing new requirements.

What you need to ensure for the future is that after each change the code is still clean and simple. If it is easy to understand the code, it will be easy to refactor it.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.