back

by layer8·6y ago·view on hn ↗
What they meant by DRY is otherwise known as SPOT — Single Point Of Truth — which is harder to misinterpret. The same “truth” — which can be data, values, behavior, policy, etc. — should not be defined multiple times in separate places, because a future change would have to be applied to all the places, or else cause different parts of a program or datastore to have inconsistent views on what the “truth” is.

If you google for it, you will find the synonymous “Single Source Of Truth”, which however makes for a worse acronym.

1 comments
Incidentally, this may explain why caching is hard - cache invalidation in particular. By definition, it must violate this SPOT/SSOT principle.
While there is a thematic connection, SPOT is usually more of a design-time (or coding-time) principle. Caches still represent the same source, just time-delayed.
That's not quite true; it's closer to say that it's very easy to design a cache mechanism which accidentally violates SPOT.