DEV Community


Discussion on: Facades should not have Working Plumbing

jeastham1993 profile image
James Eastham • Edited

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

integerman profile image
Matt Eland Author

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.

jeastham1993 profile image
James Eastham

Agreed! Of all the 'rules' around development, class and method lengths is one I think is really valuable.

Forem Open with the Forem app