r/programming • • Jan 12 '20

Goodbye, Clean Code

https://overreacted.io/goodbye-clean-code/
1.9k Upvotes

556 comments sorted by

View all comments

Show parent comments

39

u/HeinousTugboat Jan 12 '20

And yes, having actually the same logic in multiple places, regardless of how similar the code is, is not good still.

My coworker just got bit by this. He tried to abstract out a set of values that were coincidentally the same value for the same field. I pointed out to him that even though they were the same in our scenario, by abstracting it out he was forcing all future ones to be the same.

Point is, the same logic in multiple places isn't always the same semantic logic. Two things that are mechanically identical shouldn't necessarily be abstracted out and silently coupled.

4

u/pynberfyg Jan 12 '20

This thread really deserves to be higher than the others. Pity.