On May 9, 2006, at 7:04 AM, Pistos Christou wrote:

> Eric Hodel wrote:
>> My unit tests typically tell me which line my errors are on.  You
>> probably haven't written enough tests for your code or aren't writing
>> small enough chunks of code.
>>
>> The biggest change writing tests has done for my coding is to give me
>> smaller more descriptive methods rather than large methods that do
>> too much.  A method that is more than 10 lines long is probably
>> wrong.  A method that is more than 25 is most definitely wrong.
>
> Poll (for everyone, not just Eric): What is good or acceptable method
> size in your opinion?  On what factors does your range depend?

A good and acceptable method size should be almost entirely based on  
comfort.  Trying to artificially constrain yourself is only going to  
lead to bad code (and stress).

My coding style (with TDD) leads to 10 to 25 line methods because  
those are most comfortable.

-- 
Eric Hodel - drbrain / segment7.net - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com