logoalt Hacker News

drunkboxer • today at 9:10 AM • 1 reply • view on HN

I've always found DRY to be more useful when applied to data rather than code. Eg don't have two versions of an enum, or a mapping, or the information in some database.


Replies

bruce343434 • today at 1:36 PM

In some cases DRY is also related to parse-don't-validate. Don't repeat validation all over, but have a single canonical parser and a single canonical data transfer object. Typescript frontend+backend makes this even easier.