3 ms·
DRY is so that when you change one place, you don't forget to change it in the other place, likely resulting in a bug or bugs. There is a simple (for some peopl
by zamnos 4y ago
DRY is so that when you change one place, you don't forget to change it in the other place, likely resulting in a bug or bugs. There is a simple (for some people's definition of simple) solution to this, which is to document this dependency in a comment in all four places - the extra two being the end of the particular block as well, so it doesn't get missed by a reviewer if the starting comment is past the top of the screen for the reviewer. Having this checked by your automated testing system is left as an exercise for the reader.