Re: Mixing OO and DB

From: rpost <>
Date: Sat, 08 Mar 2008 12:04:22 +0100
Message-ID: <322a4$47d272b6$839b4533$>

Marshall wrote:

>I'm going to argue that I have seen no evidence that writing
>methods any smaller than 150 lines produces any measurable
>benefits. I'm further going to argue that you haven't either.

Neither have I, but there is an obvious argument: more modular code becomes easier to explain and easier to test. In my experience, 150 line method bodies can usually be chopped up into meaningful subroutines, i.e. with few dependencies. All kinds of subtle dependencies can hide in 150 lines that become explicit when you try to subdivide these lines. Provided, of course, that you make these dependencies explicit as arguments; if they are going to be hidden away in global variables and the like, there's no benefit in subdividing the method bodies.

Received on Sat Mar 08 2008 - 12:04:22 CET

Original text of this message