On Tue, Aug 5, 2008 at 2:20 PM, Whil Hentzen <[EMAIL PROTECTED]> wrote:
> 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.
__________________________________________________________________
Back away from the jelly donuts!  Take another step back.

KISS is the answer, so making them smaller, manageable is a good thing.

I am not fighting the same battle but trying to live on that same line.
-- 
Stephen Russell
Sr. Production Systems Programmer
Mimeo.com
Memphis TN

901.246-0159


_______________________________________________
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