[#7055] More on VC++ 2005 — Austin Ziegler <halostatue@...>

Okay. I've got Ruby compiling. I'm attempting to get everything in

17 messages 2006/01/05
[#7058] Re: More on VC++ 2005 — nobuyoshi nakada <nobuyoshi.nakada@...> 2006/01/06

Hi,

[#7084] mathn: ugly warnings — hadmut@... (Hadmut Danisch)

Hi,

22 messages 2006/01/10
[#7097] Re: mathn: ugly warnings — Daniel Berger <Daniel.Berger@...> 2006/01/10

Hadmut Danisch wrote:

[#7098] Design contracts and refactoring (was Re: mathn: ugly warnings) — mathew <meta@...> 2006/01/10

Daniel Berger wrote:

[#7118] Re: Design contracts and refactoring (was Re: mathn: ugly warnings) — mathew <meta@...> 2006/01/12

*Dean Wampler *<deanwampler gmail.com> writes:

[#7226] Fwd: Re: Question about massive API changes — "Sean E. Russell" <ser@...>

Hello,

23 messages 2006/01/28
[#7228] Re: Question about massive API changes — Caleb Tennis <caleb@...> 2006/01/28

>

Re: Design contracts and refactoring (was Re: mathn: ugly warnings)

From: Dean Wampler <deanwampler@...>
Date: 2006-01-12 23:13:39 UTC
List: ruby-core #7130
I'm not sure I follow you exactly, but I think I more or less agree ;)
A couple of comments. The redundancy part (or DRY in Ruby parlance) I
was referring to is the goal of only writing the requirements once and
it's better to write them in an executable format so they have
enforcement power. So, where possible, you should do that with your
test code, especially at the level of design and implementation.

However, a limitation of the "test uber alles" philosophy that I
didn't mention before is that it's impossible for most of the people
who define the requirements to also write code, since they are usually
marketing people, end users, etc. That means a coder has to sit with
the requirements person and code the tests.

The "fit" and "fitnesse" tools were invented to address this problem.
Requirements writers enter the requirements in a structured format in
spreadsheets, web pages, etc. and tools parse them to generate
acceptance tests. (I haven't worked with these tools so I'm fuzzy on
the details.)  You're still only writing the requirements once, so
you're still supporting DRY, yet it is approachable by non-coders.
(I'm sure that not all requirements can be handled this way, in the
real world...)

So, the acceptance tests used by customers to confirm that
requirements are met may be written in a documentation tool from which
test code is generated. However, lower level (derived) requirements
and design issues are "documented" in the hand coded unit tests
themselves. (Maybe these tests can sometimes be generated too, as long
as the "generator" has been suitably validated!) Anyway, DRY is
satisfied all around (at least in principle!) and no requirement goes
untested.

dean

On 1/12/06, Mathieu Bouchard <matju@artengine.ca> wrote:
> On Fri, 13 Jan 2006, mathew wrote:
>
> > >  The XP view is
> > > that you should eliminate the redundancy.
> > Except it's not redundancy.
> > Unit tests define a set of functionality that is required. Documentation tells
> > you the functionality that is supported, which is generally a superset of the
> > functionality required by the unit tests.
>
> Let's follow the argument of both of you to the end.
>
> 1. Unit-tests often match inputs with outputs on a case-by-case basis.
>
> 2. Redundancy should be eliminated.
>
> (1) suggests that there is a shorter way to express the unit-tests.
> Suppose you are able to find a formula for generating output-validators
> from inputs. Then that formula is a postcondition of a contract, and the
> explicit output-validators of the unit-tests are redundant.
>
> (2) because part of the unit-tests are redundant, part of the unit-tests
> should be eliminated. This causes the postconditions to become an
> essential part of unit-testing.
>
> Unit-tests vs contracts is a false debate.
>
>  _ _ __ ___ _____ ________ _____________ _____________________ ...
> | Mathieu Bouchard - t駘:+1.514.383.3801 - http://artengine.ca/matju
> | Freelance Digital Arts Engineer, Montr饌l QC Canada
>
>


--
Dean Wampler
http://www.aspectprogramming.com
http://www.newaspects.com
http://www.contract4j.org


In This Thread