Long methods cause cancer?

  • Posted By Stuart Halloway on April 18, 2008

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.

Comments
  1. Rick S.April 18, 2008 @ 02:45 PM

    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.

  2. StuApril 18, 2008 @ 11:13 PM

    Rick: My tongue was firmly in cheek. That said, 90% of the 20+ line methods I have ever code reviewed have been awful.