257m@lemmy.ml to Programming@programming.dev · 2 years agoWhat are your programming hot takes?message-squaremessage-square36fedilinkarrow-up11arrow-down10
arrow-up11arrow-down1message-squareWhat are your programming hot takes?257m@lemmy.ml to Programming@programming.dev · 2 years agomessage-square36fedilink
minus-squarelysdexic@programming.devlinkfedilinkEnglisharrow-up1·2 years agoDuplicate code can be a code smell, but it’s far better to have the same function definition or code block appear twice in the code than extracting a function that tightly couples two components that should not be coupled at all. See Write Everything Twice (WET) principle.
Duplicate code can be a code smell, but it’s far better to have the same function definition or code block appear twice in the code than extracting a function that tightly couples two components that should not be coupled at all.
See Write Everything Twice (WET) principle.