4 ms·
People focus too much on DRY and not enough on modularisation. If your functions do everything, DRYing them can be awkward and ineffective. If you stop injecti
by sureIy 2y ago
People focus too much on DRY and not enough on modularisation.
If your functions do everything, DRYing them can be awkward and ineffective. If you stop injecting your business logic into every line and attempt to create "pure" functions, it's so much easier to sprinkle the occasional `if(input.type2) pow(input, 2)` in the business part.
If your codebase isn't at least 20% "utils", I don't want to touch it. I regularly dip into code I wrote months/years back and reuse it without much thought.