The Case Against DRY
reddit.com·20w·
Discuss: r/webdev

I was going to add this as a response to a recent Tailwind thread, but it’s something I see come up time and time again: people misunderstanding the DRY principle. I feel like this is something you quickly learn with experience, but I want to get the discussion out there in the open.

The DRY principle is one of the most misunderstood principles in software engineering. Just because two repetitions or code look the same does not mean they are the same. DRY is more often than not misapplied. DRY is about having a consistent source of truth for business logic more than anything. It’s about centralizing knowledge, not eliminating repetition. Every time you write reusable code, you’re creating a coupling point between parts of the system. You should be careful in doing so.

There is a…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help