3 ms·
I love the rule of three. I know I've heard it on the Go Time podcast, but I'd heard it before then. Copy your code once. If you find you've copied it again la
by andrewstuart2 4y ago
I love the rule of three. I know I've heard it on the Go Time podcast, but I'd heard it before then.
Copy your code once. If you find you've copied it again later, that's the right time to think about whether you'll continue to, and therefore whether it's worth making something reusable.
So yeah, wrappers are nice. But I'm also a really big fan of lazy wrappers. Wrap the thing barely enough to get the job done so you can upgrade in one place, but don't get fancy because you will probably hate yourself for it down the road.
- tcfhgj 4y agoI hate that rule. It makes almost entirely sure that you'll loose control for your duplicates. The way around is way easier