in reply to Style Question: small and modular, or big enough to do the job in one piece?

As a computer science prof once said to our class...keep your subroutines (at most) at about the size of a page of code. It does make life easier especially when you go back and read that code that you wrote a few months ago. A subroutine or function that says 'ftp's using get' or whatever is far more intuitive than fifty lines of code in the middle of two-hundred that does the same thing.

Update:

This being Perl, a msg from lachoy reminded me that I should probably change this to subroutines (instead of the original modules) since module means something different (i.e. a collection of subroutines) in Perl.

metadoktor

"The doktor is in."

  • Comment on Modularize - Re: Style Question: small and modular, or big enough to do the job in one piece?