According to Kent Beck, the following are essential to keep code healthy.
- Tests should pass
- Code should reveal intent
- No duplicate code (aka: isolate knowledge, SRP, SPOT, etc)
- Fewest elements – less no of classes & methods
With 4 – the temptation to cram and break SRP should be avoided. The 10/100 principle can help keep an eye on if something is growing bigger than it should be. The 10/100 principle is about keeping methods to 10-ish lines or less and classes to 100-ish lines or less.