"When you find you have to add a feature to a program, and the program's code is not structured in a convenient way to add the feature, first refactor the program to make it easy to add the feature, then add the feature."
January 1, 1970
https://en.wikiquote.org/wiki/Martin_Fowler