My friend Scott Davis suggests that long methods are like cancer. Right on! But let's be a little more specific:
- > 30 lines ~ pancreatic cancer
- 30 lines ~ brain cancer
- 15 lines ~ prostate cancer
- 8 lines ~ no cancer (yet--keep trying)
If you are fortunate enough to know nothing about cancer mortality rates, go back and follow the cancer link. Delightful surprise to my googling on the topic.
Ah, Tufte is good with presenting data the way it is. I went to one of his seminars, and will never look at Power Point the same way again …
Equating long methods with cancer mortality rates seems to be stretching it a bit, though.
Rick: My tongue was firmly in cheek. That said, 90% of the 20+ line methods I have ever code reviewed have been awful.