Question to experienced users on methods. How many lines should a method be ?
A fine method consists between # to # number of lines..
I know, it depends on the application and everything else just like there are cars that have engines that are only 60 horsepower and some cars are like 1000... But I am asking for something general.
Like to some Alien you would say, a novel is usually somewhere from 400 pages to 600. That does not mean there are no novels with 100 pages or 1000 pages.
I am asking this because I feel like I am putting so much in one method.
Re: Question to experienced users on methods. How many lines should a method be ?
My rule of thumb is: a method should do just do one thing and what a method does should be described in one (not too long) sentence. This sort of implies that the sentence doesn't contain 'and's. It also limits the size (number of non-empty) lines of a method.