257m@lemmy.ml to Programming@programming.dev · 3 years agoWhat are your programming hot takes?message-squaremessage-square47linkfedilinkarrow-up13arrow-down10
arrow-up13arrow-down1message-squareWhat are your programming hot takes?257m@lemmy.ml to Programming@programming.dev · 3 years agomessage-square47linkfedilink
minus-squarelysdexic@programming.devlinkfedilinkEnglisharrow-up1·3 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.