4 ms·
> doesn't mean somebody else is going to find it You either failed to document it / name it properly or the other dev was too lazy to find it. Making 10 differ
by chpmrc 8y ago
> doesn't mean somebody else is going to find it
You either failed to document it / name it properly or the other dev was too lazy to find it. Making 10 different variations of the same thing is purely a mistake, not a good reason to justify not encapsulating code into reusable chunks.
> Now you have two code paths in the function
But the whole point here is that you don't need to know how those code paths are implemented, only that they work the way they are supposed to.
> You can't predict the future.
Just because you can't predict the future doesn't mean you shouldn't prepare for it.