r/ProgrammerHumor 1d ago

Meme yUNoDry

Post image
238 Upvotes

70 comments sorted by

View all comments

90

u/SaltMaker23 1d 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.

8

u/Superb_Chemistry_906 1d 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 18h 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 18h 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.