I think extracting to methods is good, but I think it's better to not hide initialization. For example, I would have preferred it like mView.setTabLayout(createLayout()) because more clearly conveys what's being done (and has less side effects and so on).
Also, having methods indicates that you plan to reuse the code inside it. I think immediately invoked functions is a great way to handle that (although not all languages support that):
Separation of concern is another reason why we define methods and if we define proper method names then we need not worry about IntelliSense drop down list size.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I think extracting to methods is good, but I think it's better to not hide initialization. For example, I would have preferred it like
mView.setTabLayout(createLayout())
because more clearly conveys what's being done (and has less side effects and so on).Also, having methods indicates that you plan to reuse the code inside it. I think immediately invoked functions is a great way to handle that (although not all languages support that):
You might also use lambdas or similar code grouping elements.
"having methods indicates that you plan to reuse the code inside it"
That's what really bothers me about having all those small functions. I don't need them anywhere else and my IntelliSense is soon full of garbage.
Separation of concern is another reason why we define methods and if we define proper method names then we need not worry about IntelliSense drop down list size.