in reply to Thoughts on using subroutines to clean up code?

It's not a rule, just a rule of thumb: if a subroutine is too long to fit in a terminal screen, say 50x70, the subroutine is probably too long.

What was said already applies. With unit tests (a test for each sub), refactoring is safe and often fun. So write them if you don't already have them. Without examples, concrete advice that won't be misconstrued is hard to offer.

  • Comment on Re: Thoughts on using subroutines to clean up code?