Re: Mixing OO and DB
From: Marshall <marshall.spight_at_gmail.com>
Date: Mon, 3 Mar 2008 17:58:10 -0800 (PST)
Message-ID: <9150e2e0-3814-4754-827c-3194152181de_at_i29g2000prf.googlegroups.com>
> A function should be no longer than five or ten lines of code. A
> function should have no more than one indent level. The body of each
> if statement should call one function. The body of each loop statement
> should call one function.
Date: Mon, 3 Mar 2008 17:58:10 -0800 (PST)
Message-ID: <9150e2e0-3814-4754-827c-3194152181de_at_i29g2000prf.googlegroups.com>
On Mar 3, 5:39 pm, Robert Martin <uncle..._at_objectmentor.com> wrote:
>
> A function should be no longer than five or ten lines of code. A
> function should have no more than one indent level. The body of each
> if statement should call one function. The body of each loop statement
> should call one function.
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.
Marshall Received on Tue Mar 04 2008 - 02:58:10 CET