Remix.run Logo
alberto467 an hour ago

Code duplication differs from single source of truth applied to data in the sense that data is data but two pieces of code may functionally be the same (they do the same thing) but they might be semantically different in their usage (they’re advertised to achieve different things), in that case coupling them together with deduplication and forcing them to do the same thing doesn’t really make sense, and may make the codebase more difficult to work on in the future (especially in companies where different teams have responsibilities over different parts).

threethirtytwo 9 minutes ago | parent [-]

code and data are the same thing.

but thats too philosiphical to talk about or for you to understand.

Put it this way. You're implying code can be duplicated as long as they are advertised to do different things. But can't that conceptually be applied to data as well? I have the number 5 representing age, and I also have the number 5 duplicated somewhere else representing cost. 5 is duplicated because they are "advertised" to do different things.

Because code and data are philosophically the "same" the properties of "single source of truth" applies to both in the same way.