My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

What is your general opinion on breaking DRY to reduce generic complexity and enable specialized simplicity ?

j's photo
j
·Dec 10, 2016

Impossible! DRY FTW! #DRYFORLIFE

17%

Sometimes breaking DRY is a needed evil.

76%

What is this magical DRY, can we eat it?

0%

I try not to generalize -> pls elaborate

7%

41 votes · Closed

as most of us know we have DRY which is a very important rule to keep things maintainable. To keep our application behaviour deterministic we want to make sure that we only have 1 place where certain things are happening.

Like having only one query function instead of 14 in different files with slightly different behaviour.

But as functions fullfill our needs, we tend to create a pivotal point so we only have 1 function to rule them all and push unneeded complexity onto it.

My question is -> when do you think it's valid to break DRY for the sake of simplicity ? I refer to simplicity in the context of Bill Hickey the simple made easy.

I am a backend dev and usually that means DRY and generics are the holy grail! In the frontend however it tends to be less efficient, because the bottleneck is often not efficiency of code but output of layouts.

Having 10 specific tables is better than just having 1 with 80 parameters for example -> faster adoption, less complexity.

Just to be sure .... I don't say violate it in general, I ask what could be reasons to violate it.