Re: Test first as specification



On Wed, 03 Aug 2005 23:09:07 -0500, Robert C. Martin <unclebob@xxxxxxxxxxxxxxxx> wrote:

On 3 Aug 2005 06:30:44 -0700, "Daniel Parker"
<danielaparker@xxxxxxxxxxx> wrote:

a programming
language is a counter example to "specification by tests" because it
does not appear to be either realistic or desirable to specify a
non-trivial programming language entirely through tests.

Isn't it Noether's theorem that says that every specification implies the existence a test?

<giggle>

Anyway, how do you test that a compiler conforms to the spec?  You
convert the spec into tests and apply those tests (whether manually or
automatically, but hopefully automatically).  This means that there is
a mapping of tests to specs, and specs back to tests.  So specs *are*
tests, and tests *are* specs.

There is a mapping of every programming language construct to assembler but
that doesnt mean that it is desirable to code in assembler.
During this mapping intent is lost. Intent is also lost in the conversion of
specs to tests and the more abstract and conceptually dense the subject
matter the more likely this is to happen.


It one thing to say that given any spec you can turn it into tests, but its
quite another to say that you can use tests alone to gain and communicate
understanding of the problem domain at the conceptual level.

Having said that there is a huge swath of problems that are ameanable to
such an approach but IMO it haas its limits in certain specialist areas.

Paul C.
.