|
|
|
|
|
by gnaritas
5057 days ago
|
|
It's no effort, it's a simple automated refactoring, right click, extract method, choose name, done. I think your positions betrays your age and tells me you probably code in a text editor rather than a more powerful IDE. To fear extracting a method is just insane to me, a sign of past times. Functions shouldn't have major steps, they should be one step each with a top level function calling the steps in sequence. A function should do one conceptual thing, or be a delegator to sequence other functions. Mixing levels of abstraction where all the steps are inlined into the larger master function that also sequences them is IMHO a code smell that demands fixing. Kent Beck had quite a bit to say about this very thing in Smalltalk Best Practice Patterns. Like I said, I bet you use the scroll bar a lot. |
|
Says the fellow that hoists incredibly simple code out to independent functions.
On the subject of age, since you broached it -- Given your seriously arguing for not commenting, coupled with the naive hubris so often associated with youth, I can only assume that you're ether young, inexperienced, and/or do little work in maintaining production code across the years.