Good practice class line count
class
Solution
Yes, I'd say it does have to do with the language, if only because some languages are more verbose than others.
In general, I use these rules of thumb:
- < 300 lines: fine
- 300 - 500 lines: reasonable
- 500 - 1000 lines: maybe ok, but plan on refactoring
- > 1000 lines: definitely refactor
Of course, it really depends more on the nature and complexity of the code than on LOC, but I've found these reasonable.
Problem
I know that there is no right answer to this question, I'm just asking for your opinions. I know that creating HUGE class files with thousand lines of code is not a good practice since it's hard to maintain and also it usually means that you should probably review your program logic. In your opinion what is an average line count for a class let's say in Java (i don't know if the choice of language has anything to do with it but just in case...)