3 ms·
The flip side of that question, though, is how often you add in abstractions that you either never use or to code that you don't really need to change. Plannin
by akeefer 17y ago
The flip side of that question, though, is how often you add in abstractions that you either never use or to code that you don't really need to change. Planning for the future, as it were, is only a win if the amount of time you save when you guess right is larger than the amount of time you pay when you guess wrong and do unnecessary work (or make things more complicated than necessary, thus slowing down all related work, etc.).
I'm all for properly refactoring code, but there's something to be said for the fact that trying to guess what you'll need in the future usually equals guessing wrong, unless "the future" is really close in time (i.e. a week or two away). Personally I've had plenty of those "glad I abstracted it this way" or even "I wish I'd abstracted it initially" moments, but also plenty of the "wow, good thing I didn't sink too much time into this 4 months ago because I would have never guessed I'd need to change it this way" moments too.