Re: Test first as specification



"Daniel Parker" <danielaparker@xxxxxxxxxxx> wrote in message
news:1123163866.515185.321110@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> Robert C. Martin wrote:
>> On 3 Aug 2005 12:58:47 -0700, "Daniel Parker"
>> <danielaparker@xxxxxxxxxxx> wrote:
>>
>> >To suggest that a programming language could be specified through tests
>> >alone is a fairly bold statement, and I would expect it to be
>> >accompanied by some appeal to prior experience, or a sketch of how it
>> >might work, but I don't see that, all I see is the statement.
>>
>> A compiler can be specified through tests. This is obvious on the
>> surface of it since a compiler is made up of executable lines of code,
>> and any executable line of code can be tested.
>>
>> A compiler is not a language. However, since any spec is convertible
>> into a test and vice versa, it seems clear that a language can be
>> specified with tests.
>>
> What do you mean by a specification?
>
> (i.) Do you see a specification as being complete, in the sense that a
> development team should be able to build a computer program from the
> specification, without supplementary written or verbal communication?

That is the funniest thing I've read this week. I think you intended it to
be biting but I find the notion humorous that ANY specification, whether by
tests or by documents, in lieu of ongoing learning and analysis, could
possible describe a complex system (whether a compiler or a business
application or a commercial product, etc) with anywhere near enough detail,
in a timely manner, to allow a development team to hide in the closet while
coding. The notion is completely absurd on its face. It's Clown paint. I
cannot imagine anyone who would seriously suggest that a specification is
something that allows a program to be built in a vacuum.

>
> (ii.) Do you regard a specification as a set of criteria that are
> necessary and sufficient for verifying that a computer program is
> correct?

I'm not sure that tests are an EFFICIENT way to do this. I suppose it is
possible, but I can think of better ways to spend time.

>
> (iii.) Is it important that a specification be meaningful to
> developers, suggesting algorithms and approaches, or is it only
> important that it perform a validating role?

The biggest fallacy that I run across in the notion of "large documents =
good software" is the idea that the details of a solution should be
described in a human language. I like documents for what they can do. You
can make a contract. You can describe a list of functions that your app
must support. You can describe costs and risks and effort plans. However,
the notion that requirements need to go through this process of creating
multiple specifications, one a parent to the next, until finally code pops
out... that is truly bizarre. One document for requirements. One for
design. Then code. If your designers are the only people smart enough to
understand how to build the code, why aren't they building the models that
produce the code? Writing a document is not a very effective way to teach,
and it is a sucky way to learn.

With respect and regards,

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--


.



Relevant Pages

  • Re: "STL from the Ground Up"
    ... high-level intermediate language than can interoperate with many other ... If your language lacks expressive features then you cannot write code ... memory management in comparison. ... Mostly because type errors mean that the programmer and compiler disagree ...
    (comp.programming)
  • Re: A note on computing thugs and coding bums
    ... It would handle international characters if the execution character ... method I used in "Build Your Own .Net Language and Compiler". ... work areas and counting on Nul is an illusion. ...
    (comp.programming)
  • Re: WaitForSingleObject() will not deadlock
    ... represent an incorrect implementation of the language. ... the *compiler* does not guarantee this. ... but to state it in terms of the execution instead of the formal semantics of the language ... as long as the optimizations do not change the semantics of the language). ...
    (microsoft.public.vc.mfc)
  • Re: subroutine stack and C machine model
    ... Use a compiler optimizer ... higher determinism means that optimizer has more information. ... C programmers like to brag that their "language" is more ... prospective computer science majors at Princeton. ...
    (comp.lang.c)
  • Re: "STL from the Ground Up"
    ... are not features of a language. ... To support reflection you make a compiler embbed type and functional information in the compiled program. ... When the OCaml compiler is given a complicated nested pattern match it ... virtual const Base *clone= 0; ...
    (comp.programming)

Loading