The Case Against DRY
reddit.com·12h·
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...