3 ms·
The problem that always ends up with this is what defines "one task". I've rarely come across people who didn't agree with the notion that things should only do
by jghn 10y ago
The problem that always ends up with this is what defines "one task". I've rarely come across people who didn't agree with the notion that things should only do a single task, but I often find disagreement on the granularity of what a task is.
FWIW I don't prefer small functions for reusability but for reasonability. It's a lot easier for me to discern what that block of 10-15 lines of code is doing if it has a descriptive name and a type signature.
- sidlls 10y agoWell, when those small functions are a series of other functions it can hinder "reasonability" just as easily as help it. There's no one right way to do it, really. My objection is mainly toward a zealous adherence to some subjective principle here.
- jghn 10y agoHonestly it's one of those YMMV things, as you say there is no right answer. That's why I said "for me" :) People are different and drill into information differently as well. Most of the arguments I've had over the years on this subject were cases where we were both right. To them X was more reasonable and to me Y was, and the two were mutually exclusive. As I write this it makes me wonder if this whole topic is a fool's errand, are we doomed to forever be trying To solve an unsolvable problem?
- sidlls 10y agoCouldn't agree more. It does seem like one of those many things where the team itself should probably determine a happy middle ground and stick to it.