So I'm working on this gig with a customer. The customer's rep is one of 
these POOP folks, very anal about stuff that I'm somewhat more pragmatic 
about.

One of their pet peeves regards method length. Somewhere they read in a 
book that methods shouldn't be longer than 20 characters. I've got this 
method that processes a table and dynamically creates objects based on 
rows in the table. There are lots of different objects and bunches of 
different rules, but they're all really simple. So my singular method 
looks like:

   if <row condition>
     set object property
   endif

   if <two other row conditions>
     set a different object property
   endif

   do case
   case <lots of cases>
     set various properties
   endcase

About 150 lines, maybe. Pretty straightforward. My associate wants me to 
break this down into tiny methods, so the main method looks like so:

=ProcessConditoinOne()
=ProcessConditionTwo()
=ProcessConditionThree()
etc.

and then write a couple dozen little methods that each consist of 3 to 7 
lines.

Put the weapons away. Discuss.

Whil
P.S. I know I'm not actually going to convince this fellow otherwise; 
I'm just venting.


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to