On May 7, 2006, at 7:56 PM, Roy Sutton wrote:

> Jim Freeze wrote:
>> Try unit testing for a while and you will see. After doing
>>   1) write code
>>   2) write test
>>   3) run test and see it succeed
>>
> I'm not sure why everyone automatically assumed he did not use unit  
> testing.  Unit testing certainly can point out there -is- an  
> error.  The fix he proposes for his problem (typoing variable  
> names) tells him -where- the problem is.  Unit tests can tell you  
> generally where you problem is but it still takes the debugging  
> work to step in and find out what -caused- the problem.  I think  
> people are doing Talha a disservice by assuming that if he just  
> tested better his problems would go away.

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.

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

http://trackmap.robotcoop.com