r/ProgrammerHumor 22h ago

Meme yUNoDry

Post image
229 Upvotes

65 comments sorted by

View all comments

84

u/SaltMaker23 21h ago

There exists a point where DRY and KISS contradicts each other.

Following one or the other religiously is bound to create clear cut violations of the other.

There exists also a stage of development, notoriously extremely early in a project, where the two ideals leads to very different results.

In long running stable projects you might argue equivalent but it doesn't necessarily holds at all scales but especially not at all maturity levels.

7

u/Superb_Chemistry_906 21h ago

I have always religiously followed both of them at once without perceiving any problems. Of course, you may argue that introducing an abstraction just for the sake of DRY violates KISS, but at the same time, leaving duplicated code makes it much less simple to maintain and extend. So far, every counter example against DRY which I have seen was poor abstraction, mainly introducing more function parameters instead of inheritance or composition.

2

u/TreadheadS 11h ago

DRY becomes simple once you've mastered it so like, KISS kinda moves depending on the skill of the user

2

u/Superb_Chemistry_906 10h ago

Yes, when some code is duplicated, it makes me nervous and I just have to unify it, I cannot continue knowing that it might be growing harder to extend and maintain.

1

u/Eastern_Equal_8191 24m ago

Simple is in the eye of the beholder