Best practice: single source of truth (SSOT), vs DRY (don’t repeat yourself)

Jacob Tan En
Jan 24, 2021

“Single source of truth” is more meaningful than the overly simplistic “DRY”.

If two things are _supposed_ to behave similarly, then not having duplicate code makes perfect sense.

If two things just _happen_ to behave similarly (at first), it may be a hasty generalisation to immediately refactor them to use the same code.

--

--