Phlip said:
Lack of comprehensive, automated tests is the
greatest failing.
I'll assume here that you mean that the execution of the tests is automated
and not their generation. Still, I disagree. While it would be worthwhile to
have code that's both well-designed and rigorously tested, in practice, the
better code is designed, the more it's impervious to defects. Rigorous
testing of badly designed code is an amusing concept, particularly since
it's difficult to imagine someone without the ability to design code being
able to design meaningful tests.
But design-for-testing typically leads to much
less coupling.
John and I debated the point a few times and came to the conclusion that we
were basically saying the same thing. John's argument was that
design-for-testing leads to better overall design and I argued that good
overall design leads to better testability. The fact we both agreed on is
that they're one and the same, but testability can be used as an objective
litmus test.
Claudio Puviani