I agree with most of your comment, except the idea that you can anticipate in what directions your software is going to grow. That’s never actually worked for me. Whenever I tried designing for future requirements instead of current simplicity, clients found a way to throw me a curveball that made me go “oops, this new request screws up my whole design!”
If my program ever needs a second pie chart, it’s better to factor the functionality out then instead of now. Less guesswork, plus a three-screen-long function is way easier to factor than a set of small chunks is to refactor.
except the idea that you can anticipate in what directions your software is going to grow
It’s ironic that I should be suspected of claiming that. Let me reassure that you on this point, we agree as well. (It’s looking more and more as if we have no substantial disagreement.)
My point is that the risk is perhaps lowest if you are going to add the second pie chart, but if someone else is, the three-screens-long function could be riskier than a slightly more factored version. Or not: there is no general rule involving only length.
If you want to make a pastie with that function I could give you an actual opinion. ;)
I agree with most of your comment, except the idea that you can anticipate in what directions your software is going to grow. That’s never actually worked for me. Whenever I tried designing for future requirements instead of current simplicity, clients found a way to throw me a curveball that made me go “oops, this new request screws up my whole design!”
If my program ever needs a second pie chart, it’s better to factor the functionality out then instead of now. Less guesswork, plus a three-screen-long function is way easier to factor than a set of small chunks is to refactor.
It’s ironic that I should be suspected of claiming that. Let me reassure that you on this point, we agree as well. (It’s looking more and more as if we have no substantial disagreement.)
My point is that the risk is perhaps lowest if you are going to add the second pie chart, but if someone else is, the three-screens-long function could be riskier than a slightly more factored version. Or not: there is no general rule involving only length.
If you want to make a pastie with that function I could give you an actual opinion. ;)