Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • How many lines would be too small? Commented Mar 31, 2016 at 11:33
  • The number of lines that would cause you to have too many classes. The number of classes that would make the project difficult to navigate. Commented Mar 31, 2016 at 14:32
  • It seems that there is room for a subjective opinion on what the strict min-max range should be. Searching on the net I feel ideal class size may be be a ideological/philosophical issue as well. Personally, I am ok with 400 lines of code in a class... others want 30 to 100 :S Commented Mar 31, 2016 at 14:34
  • 2
    Sure. But we have classes with 400 to 500 lines of code where I work now. They're too large; they already have several different responsibilities when they should only have one. A lot of the code is scaffolding; it doesn't do much in the way of real work, and a couple of functions are endlessly duplicated among the family of classes in question. So there's plenty of room for improvement. Commented Mar 31, 2016 at 14:35
  • Only 400 - 500? Lucky you... [looks at 6670 lines of legacy per class] Commented Apr 4, 2019 at 12:18