We had a contractor get fired at a prior job because he had a single function, that, when printed, stretched from the ceiling to the floor (9 ft high) and across a 10 ft deep cubicle. I counted over 20 pages, if I remember correctly.

His argument was that it was the "core processing" loop of the system, it did everything once, and that he didn't need to break out the code from the "case" statements.

Remember, code is as much about communicating between you and your peers as it is for the machine to execute. If you were creating the "best thing" for the machine, you would probably be writing in machine language now.

So, I would say that if a function gets much over 3-4 pages printed, it needs to be split out.

Also, I'm a "fewest lines of code possible" kind of guy. I believe in using meta-data, tables, etc. to write systems, and avoid millions of lines of code that have to be maintained. If done right, $18 an hour systems analyst can maintain configuration tables, using a GUI or something.

This approach allows me to get a lot done in a short amount of time, and most of the time, I can move on to other things and leave an admin/analyst to maintain the tables. I only have to get involved when some functionality can't be done with the existing system.

Glen Austin