How long is too long?
-
The second hand code I'm having to tidy up has numerous member functions that are over 1,000 lines long! Granted some of these have extensive comments in them, but still! How is it that nobody else finds these functions close to impossible to interpret? Oh, I know, I'm just too dumb. That's why I think it's normal to have functions that have less than 30 lines and do what its declaration says it will and reads like plain English. :mad:
Almost, but not quite, entirely unlike... me...
-
The second hand code I'm having to tidy up has numerous member functions that are over 1,000 lines long! Granted some of these have extensive comments in them, but still! How is it that nobody else finds these functions close to impossible to interpret? Oh, I know, I'm just too dumb. That's why I think it's normal to have functions that have less than 30 lines and do what its declaration says it will and reads like plain English. :mad:
Almost, but not quite, entirely unlike... me...
If browsing through code is a voyage, is that Toolong Latrek?
I wanna be a eunuchs developer! Pass me a bread knife!
-
The second hand code I'm having to tidy up has numerous member functions that are over 1,000 lines long! Granted some of these have extensive comments in them, but still! How is it that nobody else finds these functions close to impossible to interpret? Oh, I know, I'm just too dumb. That's why I think it's normal to have functions that have less than 30 lines and do what its declaration says it will and reads like plain English. :mad:
Almost, but not quite, entirely unlike... me...
I had once seen a C++ function which was about 800 lines long, consisting of only one "return true" statement at the very end, and all other lines of code commented out. In effect, all the effort spent in writing the 799 commented lines went wasted because they were finally commented out.