Re: Mixing OO and DB
Date: Wed, 26 Mar 2008 17:33:25 -0700
Message-ID: <rfqlu35g112c4bm5vfdupdm7du09fefebe_at_4ax.com>
kevin cline <kevin.cline_at_gmail.com> wrote:
>On Mar 3, 7:58 pm, Marshall <marshall.spi..._at_gmail.com> wrote:
>> On Mar 3, 5:39 pm, Robert Martin <uncle..._at_objectmentor.com> wrote:
>
>> I recall an actual empirical study that looked at defects per line
>> of code relative to function size. The rate stayed constant until
>> function size exceeded 150-200 lines.
>
>Ok. But I still argue that programs with many short functions will
>have fewer defects, because they will be shorter. When I first
>adopted the 'short function' style, I was amazed to discover how often
>those little functions end up being reused. I expect that if you hand
>me any program where the average function size is more than about 20
>lines, I would be able to refactor that program into short functions
>and reduce the line count by half or more.
Maybe.
- Sometimes, it means that the code to use a number of them in sequence is longer.
- I like to modularise, but more, I like to have the main line of code be easy to follow. If I am following the main line in a debugger, I like the code to be intelligible at that level. Sometimes, that means that I do not break something up into another procedure.
Sincerely,
Gene Wirchenko
Computerese Irregular Verb Conjugation:
I have preferences. You have biases. He/She has prejudices.Received on Thu Mar 27 2008 - 01:33:25 CET