Mauricio Chirino

13%
Flag icon
The code is the same, but the knowledge they represent is different. The two functions validate two separate things that just happen to have the same rules. That’s a coincidence, not a duplication.
Mauricio Chirino
DRY isn't about avoiding duplication at all cost, that just leads to tightly couple code that's rigid to change because an update in a single place affects multiple locations.
The Pragmatic Programmer: Your Journey to Mastery, 20th Anniversary Edition
Rate this book
Clear rating
Open Preview