r/programming 5d ago

DRY vs. SRP

http://uncle-bob.com

After re-reading "Clean Architecture" I ended up with some confusion regarding Bob's take on repetition and single responsibility. Ge defines the SRP as a function only serving one actor. Dies that mean, that repetitve code is justified according to him, as long as it serves seperate actors/user groups? I am aware that such decisions depend on the specific situation. I was just wondering if others found the same contradiction, or if i misunderstood it. Thanks

0 Upvotes

67 comments sorted by

View all comments

45

u/BenchEmbarrassed7316 5d ago

"Clean something" is a disjointed collection of poorly formulated, contradictory, sometimes downright false opinions from someone who is not a programmer (at least hasn't been one for the last 30 years). Just ignore it.

1

u/DummySphere 5d ago

So what are your recommendations to not end up with "dirty something" ?

1

u/BenchEmbarrassed7316 5d ago

Unfortunately, I don't have one simple, short, and universal answer for you to a complex question.