DEV Community

Discussion on: Stop Writing DRY Code

Collapse
 
jayjeckel profile image
Jay Jeckel

That's DRY. No need for a different acronym just because some people misapply the original. You can go around talking about MOIST code, but your basically just describing proper application of DRY.

As I was taught it, Don't Repeat Yourself, but also Write Everything Twice because it takes at least three repetitions to make an abstractable pattern.

Collapse
 
auroratide profile image
Timothy Foster • Edited

Indeed, no need to replace DRY in our day-to-day. Rather, MOIST is one tool to teach the true intent of DRY and dispel misconceptions. Of course there are different ways to teach that, but MOIST is a great comical option and one I may likely use.

Collapse
 
paddy3118 profile image
Paddy3118

Exactly, the pattern needs to be established.

Collapse
 
arvinyorro profile image
Arvin Yorro

Agreed. This is DRY with extra steps.

Refactoring should be viewed as a journey or an evolution. Avoid hasty abstractions.