hono4kami@piefed.social to Programming@programming.devEnglish · edit-220 days agoDon't DRY Your Code Prematurelytesting.googleblog.comexternal-linkmessage-square12fedilinkarrow-up11arrow-down11file-text
arrow-up10arrow-down1external-linkDon't DRY Your Code Prematurelytesting.googleblog.comhono4kami@piefed.social to Programming@programming.devEnglish · edit-220 days agomessage-square12fedilinkfile-text
minus-squarePieMePlenty@lemmy.worldlinkfedilinkarrow-up1·20 days agoUltimate DRY: just keep refactoring the one method to accept hundreds of parameters and do everything. Add two numbers? DoIt(1, 2); Subtract? DoIt(null, null, 3, 1); Etc.
Ultimate DRY: just keep refactoring the one method to accept hundreds of parameters and do everything.
Add two numbers? DoIt(1, 2);
Subtract? DoIt(null, null, 3, 1);
Etc.