10 ms·
Premature generalisation is the second cousin of all evil. The problem with DRY is that the cost of it being wrong in the future often isn’t accounted for. Co
by scanr 4y ago
Premature generalisation is the second cousin of all evil.
The problem with DRY is that the cost of it being wrong in the future often isn’t accounted for.
Copy, paste, search, replace is underrated.
That said, it’s a balancing act. The right generalisations are great.
- mmis1000 4y agoSearch, replace it with a single call to unified method when there are more than enough repetitions in the code. Probably people just call it 'Refactor'. The requirement changes and you refactor it to meet requirement. And that's all you need to do to avoid premature generalisation.