3 ms·
The reverse of that is people introducing bugs because code that wasn't DRY enough was only changed in some of the places that needed to be changed instead of a
by rkomorn 1y ago
The reverse of that is people introducing bugs because code that wasn't DRY enough was only changed in some of the places that needed to be changed instead of all the places.
To me, it's the things that are specifically intended to behave the same should be kept DRY.
- sroerick 1y agoThis is the correct take - if you're getting this type of bug, it's now past time for DRY
- pkolaczk 1y agoAn obvious example of that is defining named constants and referring them by name instead of repeating the same value in N places. This is also DRY and good kind of DRY.
- ryeats 1y agoThis is actually a particular pet pieve of mine because I worked with the Camel framework which has a lot of boilerplate in strings but if you start using constants for the common parts you now have an unreadable mess of constants concatenated together that buys you nothing.