Huge +1 for the lines of code in methods and classes. I've recently started refactoring a lot of the code I've come across to have more smaller methods than one super method. Readibility improved dramatically.
Whilst I don't think there are hard and fast rules, I still like the 'if it doesn't fit in a viewport window it's too long' as a general rule of thumb
I adopted hard rules on this after seeing my temptation to violate the single responsibility principle and taking over a codebase filled with long classes and methods. Everyone is different and different needs mean different standards.
Huge +1 for the lines of code in methods and classes. I've recently started refactoring a lot of the code I've come across to have more smaller methods than one super method. Readibility improved dramatically.
Whilst I don't think there are hard and fast rules, I still like the 'if it doesn't fit in a viewport window it's too long' as a general rule of thumb
I adopted hard rules on this after seeing my temptation to violate the single responsibility principle and taking over a codebase filled with long classes and methods. Everyone is different and different needs mean different standards.
Agreed! Of all the 'rules' around development, class and method lengths is one I think is really valuable.