[LRUG] TDD (was: Ruby Contracting)

Chris Parsons chris at edendevelopment.co.uk
Fri Feb 20 04:11:51 PST 2009


On 20 Feb 2009, at 12:01, Eleanor McHugh wrote:

> On 19 Feb 2009, at 13:48, Vahagn Hayrapetyan wrote:
>> Now, wouldn't it be nice to have a documentation for this code in  
>> the form of a robust, explicit, "spelled-out" test suite? (Or  
>> worthy of investment?)
>
> Code isn't for computers, it's for people, and if it's not readable  
> by people it isn't fit for purpose. Therefore I'd rather a codebase  
> written with an engaging and legible style that I can sit down and  
> read as hard copy than a mountain of specs and tests. YMMV.

Bit idealistic, this. Depends on the ability of the coder. Not  
everyone is able to read a complex piece of code straight off the bat.  
Also, there are plenty of languages where legibility is much harder.  
Code can also be necessarily obfuscated for efficiency reasons.

No matter how good a coder is, being able to read a clearly written  
spec is a great thing. I think IMO it basically comes down to the fact  
that its worse to write specs/tests badly than not to have them at all.

This is how I see it:

Bad code = Bad
Good code = Good
Bad code + bad specs = Worse than bad
Good code + bad specs = Bad, because of inherent overconfidence
Bad code + good specs = Good (because the code will be fixed :)
Good code + good specs = Best case

Thanks
Chris

--
Chris Parsons
Managing Director
Eden Development (UK) Ltd

chris at edendevelopment.co.uk
www.edendevelopment.co.uk

0845 0097 094
po box 425, winchester, so23 0wy, uk
Map: http://pininthemap.com/edendevelopment


Tried Pin in the Map? Mark a map location, add text, send to friends.
http://pininthemap.com

This electronic message and all contents contain information from the  
sender which may be privileged, confidential or otherwise protected  
from disclosure. The information is intended to be for the  
addressee(s) only. If you are not an addressee, any copying,  
disclosure, distribution or use of the contents of this message is  
prohibited. If you have received this electronic message in error,  
please notify the sender by reply e-mail and destroy the original  
message and all copies. The sender does not accept liability for any  
errors or omissions.



More information about the Chat mailing list