Il giorno 22/lug/04, alle 01:18, Stefano Mazzocchi ha scritto:
Ugo Cei wrote:Agreed, but even if we cannot prove that code is correct with unit tests alone, we can at least hope that - statistically - code that has 100% test coverage will have less bugs than code that has 10% test coverage. Unfortunately, my impression is that Cocoon is now at the lower end of the spectrum.
Ugo,
tests help but don't really buy us anything: have a community that is strong and diverse enough to do the regression testing for us.
Ouch! I can't believe I'm reading this. I'm not going to try to convince you that shifting the burden of testing from the shoulders of lazy programmers onto those of unsuspecting users is a bad thing. I want to be positive instead and tell you what tests do buy us:
- less recourse to debuggers - better documentation - enabling refactoring - better design - faster development
In the end it's a matter of confidence. You're developing better code faster when you have the cconfiidence that, if you break something, tests will tell you very quickly.
Let's not mix concerns: cocoon has few tests, agreed, but this has nothing to do with the architecture.
I never meant that to imply that Cocoon's architecture is not good because it has few tests. But I believe that having a wide test coverage leads to designing components that are more amenable to testing in isolation and thus less coupled. And I think we all agree that loose coupling is a worthwhile objective.
Ugo
-- Ugo Cei - http://beblogging.com/
smime.p7s
Description: S/MIME cryptographic signature