logoalt Hacker News

snarfytoday at 3:38 PM1 replyview on HN

## HARD RULE - design scope must always be maintained and no function should ever be longer than XXX lines and no class should have more than Y methods. Create new classes and subclasses and refactor until the criteria are met.

You'd be surprised how readable this makes the code when XXX is about the size of your vertical screen and Y is relatively small.


Replies

twelve40today at 3:53 PM

but then you end up with a clusterfuck of classes?

show 1 reply