What heuristics do you use to decide Long Method Smell?
I find myself using the following heuristics:
- Can I quickly comprehend what is going on?
- Do I need to parse the method’s code more than once?
- Does this code violate the Single Responsibility Principle (SRP)?
- Is the Cyclomatic Complexity of this code more than 5?
- Does this method have more than 7 +/- 2 (Miller’s Magical Number Seven) concepts?
More details: Long Method Smell: When is a method too big?