How many lines of code should a function/procedure/method have? [duplicate]
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: When is a function too long? I've recently been given the unenviable task of reviewing poor code written by another developer and documenting the bad practices. (This is all for the purposes of getting out of paying for the developer's work rather than any altruistic reason, of course!) The reviewed code has several procedures that are many lines of code - the longest is almost 600 lines. A couple of problems