3 ms·
A heuristic we use at work is to not introduce an abstraction layer until there are at least two different implementations required. That is if you think you'l
by magicalhippo 2y ago
A heuristic we use at work is to not introduce an abstraction layer until there are at least two different implementations required.
That is if you think you'll probably need multiple implications, delay introducing an abstraction until you actually do.
Also, there are different ways of providing abstraction.
Perhaps you don't need to abstract the entire implementation but, as an example, rather change one parameter from passing a value to passing a function returning a value.
- hansvm 2y agoThat touches on a couple related principles: - not doing extra work now if it's not necessary yet and if it's as cheap to do later - delaying building a thing till you know what that thing should be