[#27163] Statically linked extensions and deferred initialization. — Kent Dahl <kentda@...>

Hi.

12 messages 2001/12/01

[#27168] which editor is adviceful? — Niko Schwarz <niko.schwarz@...>

I know this always is the standard question for every language, but for

17 messages 2001/12/01

[#27191] OO AI — mentifex@... (Arthur T. Murray)

The road to supercomputer AI is paved with good inventions; visit

22 messages 2001/12/01

[#27265] John Roth dolt ( Re: A challenge to proponents of Unit Testing. ) — olczyk@... (Thaddeus L Olczyk)

Background.

166 messages 2001/12/02
[#27295] Re: John Roth dolt ( Re: A challenge to proponents of Unit Testing. ) — Ron Jeffries <ronjeffries@...> 2001/12/02

On Sat, 01 Dec 2001 13:46:42 GMT, olczyk@interaccess.com (Thaddeus L

[#28226] Re: John Roth dolt ( Re: A challenge to proponents of Unit Testing. ) — rbinder@... (Bob Binder) 2001/12/11

Keith Ray <k1e2i3t4h5r6a7y@1m2a3c4.5c6o7m> wrote in message news:<k1e2i3t4h5r6a7y-7C2620.18082110122001@news.attbi.com>...

[#27697] Re: John Roth dolt ( Re: A challenge to proponents of Unit Testing. ) — tadamsmar@... (Tom Adams) 2001/12/06

Ron Jeffries <ronjeffries@REMOVEacm.org> wrote in message news:<176717160028CE03.51B6AF6E20305FB5.2EC5DCFFD6C10DFD@lp.airnews.net>...

[#27958] Re: John Roth dolt ( Re: A challenge to proponents of Unit Testing. ) — "Robert C. Martin" <rmartin@...> 2001/12/08

On Sat, 08 Dec 2001 00:35:43 -0600, Robert C. Martin <rmartin @

[#27287] New RubyGarden Poll - this one affects us all :) — Dave Thomas <Dave@...>

38 messages 2001/12/02
[#27290] RE: New RubyGarden Poll - this one affects us all :) — "Mark Hahn" <mchahn@...> 2001/12/02

[#27482] Re: New RubyGarden Poll - this one affects us all :) — Darrin Thompson <dthompson@...> 2001/12/04

Paul Brannan wrote:

[#27488] Re: New RubyGarden Poll - this one affects us all :) — Michael Neumann <neumann@...> 2001/12/04

Darrin Thompson wrote:

[#27546] Re: New RubyGarden Poll - this one affects us all :) — Bob Hutchison <hutch@...> 2001/12/05

Hi everyone,

[#27552] Re: New RubyGarden Poll - this one affectsus all :) — "Bill Kelly" <billk@...> 2001/12/05

[#27553] Re: New RubyGarden Poll - this one affectsus all :) — David Alan Black <dblack@...> 2001/12/05

Hello --

[#27344] Programname in (un*x) top — kamphausen@... (SKa)

Dear Rubies,

25 messages 2001/12/03
[#27454] Re: Programname in (un*x) top — kamphausen@... (SKa) 2001/12/04

mark@wutka.com wrote in message news:<IsPO7.70773$8n4.4039369@e3500-atl1.usenetserver.com>...

[#27456] Re: Programname in (un*x) top — Martin Weber <Ephaeton@...> 2001/12/04

On Wed, Dec 05, 2001 at 01:03:17AM +0900, SKa wrote:

[#27369] Killer app for Ruby developers? — "Hal E. Fulton" <hal9000@...>

This is an idea that is very skeletal

17 messages 2001/12/03

[#27405] Sourceforge vs. Savannah — "Hal E. Fulton" <hal9000@...>

Opinion question(s).

16 messages 2001/12/04

[#27485] Package Naming — Dave Thomas <Dave@...>

69 messages 2001/12/04
[#27487] RE: Package Naming — "Mark Hahn" <mchahn@...> 2001/12/04

[#27501] RE: Package Naming — Sean Russell <ser@...> 2001/12/05

Mark Hahn wrote:

[#27506] Re: Package Naming — "Mark Hahn" <mchahn@...> 2001/12/05

[#27585] Re: Package Naming — "Mark Hahn" <mchahn@...> 2001/12/05

The forest service must be a hotbed for beauracracy. The only requirement

[#27587] Re: Package Naming — David Alan Black <dblack@...> 2001/12/05

Hello --

[#27588] Re: Package Naming — "Rich Kilmer" <rich@...> 2001/12/05

> -----Original Message-----

[#27589] Re: Package Naming — David Alan Black <dblack@...> 2001/12/05

Hi --

[#27591] Re: Package Naming — "Rich Kilmer" <rich@...> 2001/12/05

David...

[#27505] Do we need something like Python-URL? — ptkwt@...1.aracnet.com (Phil Tomson)

16 messages 2001/12/05

[#27647] web hosting — "ktethridge" <kevinethridge@...>

Does anyone know of a good hosting service that supports Ruby and MySQL?

18 messages 2001/12/06
[#27654] RE: web hosting — "Curt Hibbs" <curt@...> 2001/12/06

Kevin wrote:

[#27761] what are symbols good for???? — Markus Jais <info@...>

hello

13 messages 2001/12/06

[#27783] DBI and large result sets — " JamesBritt" <james@...>

I'm starting to use Ruby DBI, and I'm wondering about its use when processing

18 messages 2001/12/07
[#27805] Re: DBI and large result sets — Michael Neumann <neumann@...> 2001/12/07

JamesBritt wrote:

[#27829] Re: DBI and large result sets — "James Britt (rubydev)" <james@...> 2001/12/07

Thanks to those who helped clarify things.

[#27824] Perl/Python Module Porting — Joseph Erickson <jerickson@...>

Has there been any thought in the Ruby Community of actively porting

27 messages 2001/12/07
[#27834] Re: Perl/Python Module Porting — ptkwt@...1.aracnet.com (Phil Tomson) 2001/12/07

In article <B3265BDC-EB39-11D5-97BA-0050E4C58663@eyemg.com>,

[#27837] Perl/Python Module Porting — Eric Lee Green <eric@...> 2001/12/07

On Friday 07 December 2001 11:55 am, Phil Tomson wrote:

[#27895] Re: Perl/Python Module Porting — Mathieu Bouchard <matju@...> 2001/12/08

[#27894] Re: App server for Ruby? — Tobias DiPasquale <anany@...>

Todd Gillespie wrote

12 messages 2001/12/08

[#27897] Dictionary.com speeder upper — "Ralph Mason" <ralph.mason@...>

Here is a little script I did to make dictionary.com more useful for me.

15 messages 2001/12/08

[#27915] Ruby IDE?? What about using Eclipse?? — "Ross Shaw" <rshaw1961@...>

Eclipse (www.eclipse.org) is an open extensible IDE (written in Java) that

16 messages 2001/12/08
[#27916] Re: Ruby IDE?? What about using Eclipse?? — Robert Feldt <feldt@...> 2001/12/08

On Sat, 8 Dec 2001, Ross Shaw wrote:

[#27920] Re: Ruby IDE?? What about using Eclipse?? — "Curt Hibbs" <curt@...> 2001/12/08

I am going to do this.

[#27921] Re: Ruby IDE?? What about using Eclipse?? — Robert Feldt <feldt@...> 2001/12/08

On Sat, 8 Dec 2001, Curt Hibbs wrote:

[#27980] Displaying Ruby code in LaTeX — "Harry Ohlsen" <harryo@...>

Has anyone written a document in LaTeX that includes examples of Ruby

15 messages 2001/12/08

[#28052] How does puts decide how to print a given object? — "Harry Ohlsen" <harryo@...>

I'm writing a short tutorial introduction to Ruby for an upcoming uni

20 messages 2001/12/10
[#28062] Re: How does puts decide how to print a given object? — matz@... (Yukihiro Matsumoto) 2001/12/10

Hi,

[#28087] Re: How does puts decide how to print a given object? — David Alan Black <dblack@...> 2001/12/10

Hello --

[#28096] The benefits of dynamic typing? — Roy Patrick Tan <rtan@...>

I have just recently read an old paper by Wirth "On the Design of

59 messages 2001/12/10
[#28108] Re: The benefits of dynamic typing? — Robert Feldt <feldt@...> 2001/12/10

This is a bit long...

[#28147] Re: The benefits of dynamic typing? — "Harry Ohlsen" <harryo@...> 2001/12/10

In article <3C153282.9000309@vt.edu>, "Roy Patrick Tan" <rtan@vt.edu>

[#28150] Re: The benefits of dynamic typing? — "Mark Hahn" <mchahn@...> 2001/12/10

[#28115] Ruby for Mac OS X — "Dan Hable" <DHable@...>

Hi,

18 messages 2001/12/10
[#28119] Re: Ruby for Mac OS X — Luc Heinrich <lucsky@...> 2001/12/10

On 10/12/2001 19:05, "Dan Hable" <DHable@phmining.com> wrote:

[#28885] Re: Ruby for Mac OS X — John Beppu <beppu@...9.org> 2001/12/18

[ date ] 2001/12/11 | Tuesday | 03:23 AM

[#28179] Ruby Musings — "John Kaurin" <jkaurin@...>

Ruby Musings (IMHO):

18 messages 2001/12/11

[#28272] Survey for new Rubyists — ptkwt@...1.aracnet.com (Phil Tomson)

23 messages 2001/12/11

[#28307] Reviews solicited for Ruby article — "Harry Ohlsen" <harryo@...>

I'm in the process of writing an article on Ruby for a computer science students'

17 messages 2001/12/12

[#28308] Rendering UML diagrams? — Robert Feldt <feldt@...>

Hi,

14 messages 2001/12/12

[#28495] internal server errors — Jack Dempsey <dempsejn@...>

hi all,

15 messages 2001/12/14

[#28500] A Review of "Ruby in a Nutshell" book — Johan Holmberg <holmberg@...>

27 messages 2001/12/14

[#28552] help with ^M (line endings ) removing — Dinakar Desai <Desai.Dinakar@...>

Hello:

12 messages 2001/12/14

[#28655] RDoc - Document Ruby source files — Dave Thomas <Dave@...>

25 messages 2001/12/16
[#28768] Re: RDoc - Document Ruby source files — Dave Thomas <Dave@...> 2001/12/17

Alexander Bokovoy <a.bokovoy@sam-solutions.net> writes:

[#28769] Re: RDoc - Document Ruby source files — Alexander Bokovoy <a.bokovoy@...> 2001/12/17

On Mon, Dec 17, 2001 at 11:19:11PM +0900, Dave Thomas wrote:

[#28789] Re: RDoc - Document Ruby source files — "Christian Boos" <cboos@...> 2001/12/17

[#28676] How do you do "character filtering" of a string using each_byte. — olczyk@... (Thaddeus L. Olczyk)

I'm trying to do several things where I produce new strings from old

10 messages 2001/12/16

[#28722] stderr from external process? — "MikkelFJ" <mikkelj-anti-spam@...1.dknet.dk>

I have asked this question before - maybe it is just not possible:

75 messages 2001/12/17
[#28923] Re: stderr from external process? — "MikkelFJ" <mikkelj-anti-spam@...1.dknet.dk> 2001/12/19

[#28960] RE: Ruby 'make' replacement (Re: stderr from external process?) — "Christian Boos" <cboos@...> 2001/12/19

Hello,

[#29094] Re: Ruby 'make' replacement (Re: stderr from external process?) — "Jason Horman" <jason@...> 2001/12/20

I wrote the Torrent library. I was not sure what license to pick so I picked

[#29096] Re: Ruby 'make' replacement (Re: stderr from external process?) — Robert Feldt <feldt@...> 2001/12/20

Just a thought on this thread (it might be obvious, I just want it to be

[#29117] Re: Ruby 'make' replacement (Re: stderr from external process?) — Dave Thomas <Dave@...> 2001/12/20

"MikkelFJ" <mikkelj-anti-spam@post1.dknet.dk> writes:

[#29156] Programming Ruby — "Marcio Barbosa" <argaeus@...> 2001/12/20

Hi,

[#28737] [Announcement] Ruby news weekly — Holden Glova <dsafari@...>

-----BEGIN PGP SIGNED MESSAGE-----

30 messages 2001/12/17

[#28749] Constant loss of memory with Kernel::load in a loop — "Jens Nissen" <frodo.hobbit@...>

We have developed a wonderful application under Windows 2K using Ruby 1.6.5

31 messages 2001/12/17
[#28755] Re: Constant loss of memory with Kernel::load in a loop — nobu.nokada@... 2001/12/17

At Mon, 17 Dec 2001 19:36:42 +0900,

[#28760] Re: Constant loss of memory with Kernel::load in a loop — ts <decoux@...> 2001/12/17

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#28774] Re: Constant loss of memory with Kernel::load in a loop — nobu.nokada@... 2001/12/17

At Mon, 17 Dec 2001 22:06:31 +0900,

[#28782] Re: Constant loss of memory with Kernel::load in a loop — ts <decoux@...> 2001/12/17

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#28803] Re: Constant loss of memory with Kernel::load in a loop — nobu.nokada@... 2001/12/17

At Mon, 17 Dec 2001 23:59:17 +0900,

[#29128] Re: Constant loss of memory with Kernel::load in a loop — matz@... (Yukihiro Matsumoto) 2001/12/20

Hi,

[#28855] [IDEA] creating stand-alone versions for easy distribution etc — Patrik Sundberg <ps@...>

hi list,

10 messages 2001/12/18
[#28856] Re: [IDEA] creating stand-alone versions for easy distribution etc — Robert Feldt <feldt@...> 2001/12/18

On Tue, 18 Dec 2001, Patrik Sundberg wrote:

[#28875] C++ preincrement operator — Paul Brannan <paul@...>

In Ruby, if I do this:

17 messages 2001/12/18
[#28876] Re: C++ preincrement operator — Peter Hickman <peter@...> 2001/12/18

Paul Brannan wrote:

[#28878] Re: C++ preincrement operator — Paul Brannan <paul@...> 2001/12/18

On Wed, Dec 19, 2001 at 02:09:03AM +0900, Peter Hickman wrote:

[#28879] Re: C++ preincrement operator — "Jack Dempsey" <dempsejn@...> 2001/12/18

so basically you're suggesting that any amount of stacking -'s or +'s past

[#28911] A Ruby programmer walked into a bar ... — "Harry Ohlsen" <harryo@...>

Now that I have your attention :-) ...

29 messages 2001/12/19
[#28985] Re: A Ruby programmer walked into a bar and ordered a Ruby-Thread — Luc Heinrich <lucsky@...> 2001/12/19

On 19/12/2001 15:46, "Harry Ohlsen" <harryo@zip.com.au> wrote:

[#29036] Re: A Ruby programmer walked into a bar and ordered a Ruby-Thread — HarryO <harryo@...> 2001/12/19

On Thu, 20 Dec 2001 07:58:47 +1100, Dave Thomas wrote:

[#29038] Re: A Ruby programmer walked into a bar and ordered a Ruby-Thread — "Mark Hahn" <mchahn@...> 2001/12/20

[#29046] Re: A Ruby programmer walked into a bar and ordered a Ruby-Thread — Dave Thomas <Dave@...> 2001/12/20

"Mark Hahn" <mchahn@facelink.com> writes:

[#28926] Stream? — Ron Jeffries <ronjeffries@...>

Is there a memory stream object in Ruby, analogous to Smalltalk's

14 messages 2001/12/19

[#28977] overriding methods: (almost) a replacement for alias_method — Paul Brannan <paul@...>

I think almost all of us will agree that it's pretty ugly to do:

17 messages 2001/12/19

[#29014] But is it Fun? — edwardhatfield1@... (Edward Hatfield)

I've been watching Ruby with great interest over

19 messages 2001/12/19

[#29265] upper case to lower — "Bashar A. Asad" <baasad@...>

hello,

25 messages 2001/12/21

[#29296] XEmacs problems with ruby-mode.el

Hi,

17 messages 2001/12/22

[#29327] a better way? — Ron Jeffries <ronjeffries@...>

I was writing a little code that cached a function value, and wound up

38 messages 2001/12/23
[#29328] Re: a better way? — David Alan Black <dblack@...> 2001/12/23

Hi --

[#29331] Re: a better way? — "Hal E. Fulton" <hal9000@...> 2001/12/23

----- Original Message -----

[#29488] Python and Ruby: a comparison — Ron Stephens <rdsteph@...>

I initiated a thread over on comp.lang.python which has turned into

68 messages 2001/12/27
[#29677] Re: Python and Ruby: a comparison — Ron Stephens <rdsteph@...> 2001/12/30

Very interesting idea. Unfortunately, I doubt if it woudl be possible. For one

[#29696] Re: Python and Ruby: a comparison — "Conrad Schneiker" <schneiker@...> 2001/12/30

"Ron Stephens" <rdsteph@earthlink.net> wrote:

[#29869] Re: Python and Ruby: a comparison — Michael Kelly <mkelly2002NOSPAM@...> 2001/12/31

On Mon, 31 Dec 2001 12:26:46 +1100, Michael Lucas-Smith >Check out

[#29871] Re: Python and Ruby: a comparison — Dan Sugalski <dan@...> 2001/12/31

At 02:02 AM 1/1/2002 +0900, Michael Kelly wrote:

[#29541] New Rubygarden poll — Dave Thomas <Dave@...>

27 messages 2001/12/28

[#29545] RDoc now displays source — Dave Thomas <Dave@...>

17 messages 2001/12/28

[#29596] extending method of class A to support arguments of class B by promoting `self' to class B — Tomasz Wegrzanowski <taw@...>

(Names of classes chosen arbitrarily, just to show issue)

18 messages 2001/12/28

[#29613] Extending Ruby on Windows platform using VC++ IDE — "Alan Moyer" <moyer4@...>

Hi,

11 messages 2001/12/29

[#29667] Yet Another Newbie — Michael Kelly <mkelly2002NOSPAM@...>

Yet Another Newbie. :)

13 messages 2001/12/29

[#29713] Ruby parsers in Ruby — ptkwt@...1.aracnet.com (Phil Tomson)

Wouldn't it be cool to have Ruby playing with Parrot before Python or even

20 messages 2001/12/30

[#29773] Proc.class vs yield — Michael Lucas-Smith <s3225202@...>

Hi,

49 messages 2001/12/31
[#29782] Re: Proc.class vs yield — David Alan Black <dblack@...> 2001/12/31

Hello --

[#29795] Re: Proc.class vs yield — Michael Lucas-Smith <s3225202@...> 2001/12/31

def someThing (&a, &b)

[#29796] Re: Proc.class vs yield — David Alan Black <dblack@...> 2001/12/31

Hi --

[#29797] Re: Proc.class vs yield — Michael Lucas-Smith <s3225202@...> 2001/12/31

>

[#29802] Re: Proc.class vs yield — David Alan Black <dblack@...> 2001/12/31

Hi --

[#29849] Re: Proc.class vs yield — Michael Lucas-Smith <s3225202@...> 2001/12/31

That's a good solution, thanks.

[#29867] Re: Proc.class vs yield — David Alan Black <dblack@...> 2001/12/31

Hi --

[#29798] FXRuby FreeRIDE Spike uploaded. — Phlip <phlip_cpp@...>

Rubies:

14 messages 2001/12/31

[#29886] Ruby/Python: Software Engineering — noone <nanotech@...>

All:

36 messages 2001/12/31
[#29889] Re: Ruby/Python: Software Engineering — Tomasz Wegrzanowski <taw@...> 2001/12/31

On Tue, Jan 01, 2002 at 05:03:35AM +0900, noone wrote:

[#29904] Re: Ruby/Python: Software Engineering — noone <nanotech@...> 2001/12/31

Tomasz/All:

[#29887] RE: Ruby multi-dimensional Hash question?---Any one out there willing to give this questions a try? — "Crandall, Jeff W" <jeff.w.crandall@...>

Anyone? Is this the correct mailing list to try and get

18 messages 2001/12/31

[#29895] How to check free diskspace? — Le Wang <lewang@?.?.bigfoot.com (nospam)>

Hi all,

23 messages 2001/12/31

[ruby-talk:29012] Re: John Roth dolt ( Re: A challenge to proponents of Unit Testing. )

From: rbinder@... (Bob Binder)
Date: 2001-12-19 22:08:16 UTC
List: ruby-talk #29012
Ron Jeffries <ronjeffries@REMOVEacm.org> wrote in message news:<A89DE76B766253AB.34293E197BFFC2CC.809AF8B964D7ECD2@lp.airnews.net>...
> On 11 Dec 2001 06:55:24 -0800, rbinder@rbsc.com (Bob Binder) wrote:
> 
> >There is no evidence that this has (or would) have happened for an
> >actual implementation. Measuring coverage requires using a coverage
> >analyzer or equivalent instrumentation. Simply calling every method in
> >a (sub)class interface does not guarantee coverage of the statements
> >in the method implementations. Excluding toy problems, it is
> >completely impractical to attempt to assess coverage without using an
> >automated coverage analyzer.
> 
> Bob, thanks for a comprehensive report on coverage. I am a bit
> surprised, however, because you seem to  me to be (sort of) saying
> that theory says you can't accomplish what Beck actually accomplished
> in practice.

Unless you're referring to my saying that the example tests didn't get
statement coverage, I have no idea what you're talking about.  I
amended that remark in a later post (any one of the tests will get
statement coverage because the example code has no selection or
iteration.)

> 
> What seems to me to happen when one goes strictly test-first is that
> one gets very high coverage, of all branches. 

This can only happen in 3 cases: (1) you're extraordinarily lucky, (2)
you construct your tests from the code, or (3) you're dealing with
very simple code. With zero predicates in the scope of test and
no-peaking at the code, your chance of branch coverage is very good.
With 3, I'd say about 50%, with 4 or more, about 20%.

There are many published experiments and experience reports in
peer-reviewed literature showing that "black-box" only testing rarely
achieves better than 2/3s statement coverage.  For example awk
(Kernighan) and Knuth's TEX have an a extensive collection of black
box tests and downloadable source, have been in "production" for
years. The following experiment was done: the source was built with a
instrumenter and the test suites were run. Here's the coverage
obtained for these "excruciating", and "fiendishly clever" test
suites, which were the result of many years of development.

     Statement  Branch  Dataflow(1) Dataflow(2)
TEX   85         72       53          48
AWK   70         59       48          55

The authors reviewed the uncovered blocks and determined that the
uncovered code was not only doing exception handling.  See Joseph R.
Horgan and Aditya P. Mathur, "Software testing and reliability." in
Michael R. Lyu (ed). _Handbook of software reliability engineering._
Los Alamitos, Calif.: IEEE Computer Society Press, 1996. 531-566. BTW,
this study has a very nice analysis of the relationship between unit
test effectiveness and system reliability -- the basic result is that
both effective unit and system scope tests under the operational
profile are necessary achieve high reliability.

Keith Ray, in another post in this thread said:

"Someone on the XP mailing list said that their first measurement of
unit
test coverage, after doing XP for a while, was 68% (If I recall
correctly.) They used the measurements to improve their unit testing,
and I think it
got up to over 80% or maybe higher, and it remained high as they 
continued their project."

So, a *measured* data point for the XP test strategy hits exactly the
same limit seen for years in all other kinds of testing, which is
improved with feedback. This data point does not support your
assertions.

It bears repeating: testing can't find bugs in code that isn't tested.
 This is why we do coverage analysis. Coverage analysis checks that we
haven't missed some code -- it should never be a primary test design
strategy.

> what 
> There are exceptions ...
> and exceptions are one of them. Often in Java you can't even get a
> statement to compile unless you embed it in a try block. This forces
> the programmer to code both sides of the block while he only has a
> test for one side. 
> 

Skipping tests of exception handling because it is too difficult is
like arguing that testing automotive safety equipment (air bags, seat
belts, ...) should be skipped because you have to crash a perfectly
good car, and accidents don't happen all that often anyway, and trust
me, we're certain those belts will hold. In point of fact, if you
design exception handling for testability and use some straightforward
test driver patterns to deal with this problem, it isn't any harder to
test exception code than normal case code.


> Overall, however, the practice gets very high coverage, 

Coverage of what? How do you *know* this to be the case?  If you (or
anyone else) hasn't run a coverage analyzer, you're just guessing
about code coverage(toy problems excluded.)  Why are you able to do
what Knuth and Kernighan (and many others) routinely fail to do?

There are several freeware coverage analyzers. You can download
coverage analyzers with a 30 day try-before-you-buy license from many
leading vendors.  Why don't you all get some *real* data to support
your claims? This wouldn't take more than a few hours: download and
install a tool, instrument your app, run your test suite, and see what
you get.  Who knows -- maybe you'll be able to prove you really can
walk on water.


> which (while I
> agree it is at best the beginning, not the end of good testing) is
> very much higher than programmers "generally" accomplish.
> 
> What you didn't much address is whether this little example needs more
> tests or not.  In my view, it does not (after the one for not a
> triangle, which has been provided). It certainly seems not to require
> 22.

I addressed this question elsewhere in this thread. To repeat: (1)
Using code knowledge to exclude tests for "impossible" bugs is
defensible, and with the simple example in question, makes sense. 
Test design is always about finding criteria to reduce the
astronomical combinatorics of software. But code-based test design is
problematic for many reasons. (2) The example implementation is either
(a) a fragment (it relies on other code to reject and report invalid
input) and the XP-is-smaller-hence-better conclusion is based on an
apples-to-oranges comparison, or (b) the example code is buggy and
test suite is insufficient to reveal these bugs (it accepts values
which aren't triangles and reports that they are, and will (probably)
crash for the additional tests I proposed.) Either way, no one has
shown that a smaller and equally effective test suite is a necessary
result of the XP test approach or that the XP test approach is
necessarily superior to other test approaches in finding bugs, other
things being equal.

The 65 tests listed in my book for the Triangle class do not make any
assumptions about the implementation of the method which does the
classification (other than the class interface), and that
implementation uses line segment objects (each a pair of pixel
addresses) not ints, and lives at the bottom of a five-level
hierarchy.  We test because we don't where the bugs are -- if we knew,
we wouldn't have to test.  Every test you *don't* do is bet that there
is no bug for that input and sequence, and vice versa.

>
> With all due respect, your theoretical answer seems to me to try to
> sweep aside an interesting practical result, of which this toy is an
> exanple: the test-first practice seems to produce code which needs far
> fewer tests than black-box theory would suggest. 

My observations are based on the problem as stated. They are not
"theoretical" in the speculative sense you seem to be implying. What
"black-box theory" are you talking about? Can you do better than a
camp-fire bogey man?

Here are some speculative conclusions drawn from facts: I can see that
the XP process provides a clear incentive to write simpler,
easier-to-test code (I agree this is a good thing and that XP has a
unique and effective process to achieve this.) Compared with more
complex or poorly designed code, such code would require fewer tests
to achieve code coverage X, and would tend to be less buggy. However,
there can be no appreciable difference in the number of
specification-based tests for a given specification and test strategy,
regardless of a good or bad implementation. So, XP could result in
smaller test suites of equivalent effectiveness for a given
specification and code coverage criterion, but only because XP might
produce smaller and simpler code in the first place. In other words,
the XP approach to testing is effective not because it is good
testing, but because it is tightly coupled with good programming.
However, as the XP approach to test design is ad hoc and code coverage
is not required, it seems to me that what XP gains from simplicity
would tend to be offset by the opportunities it misses.


>It might just be an
> artifact of the example, except that many of us who are using the
> practice observe that it works well all around. 

I have yet to see anything like hard evidence and analysis that would
withstand peer-review and which would (a) substantiate the claims made
by many XP practitioners, and then (b) support a comparison of these
claims to credible baselines established for other approaches.

Every software methodology I've seen in the last 25 years has made
similar claims. My sense is the claims are mostly accurate when
discounted for the enthusiasm(?) of their advocates, but that the
specifics of the methodologies do not explain their success. For me,
that they are applied by charismatic, clever people who are already
highly skilled in their technology of choice and application space
explains most of the success. I'd be willing to bet money that a
properly constructed statistical model would show that methodological
variables are mostly noise for predicting quality and cost. For
example, the Clean-Room folks *prohibit* unit testing, and have some
published (albeit controversial) studies that show this approach to be
very effective.

> 
> My belief is that test-first is in some sense a different kind of
> testing and programming from the joe codes it and jack tests it kind
> that we have used in the past.

Strange, I thought that pair programming was exactly "joe codes it and
jack tests it".  If you're not talking about unit-scope testing or
small systems, are you suggesting that established practice of a
separate test group to do integration and system testing of large
systems should be replaced by tiny tests written by the merry coders
as they develop the app? That apps should be released when the merry
coders can't think of any more tests to not do?

As I have said many times in the past, I strongly endorse and applaud
the emphasis that XP places on testing. I have no real argument with
XP testing practices, as far as they go. I do object strongly to XP's
self-characterization of its testing slogans as necessarily sufficient
testing. I find it very disappointing that the same people who are
strong advocates of the idea of testing insist on trivializing and
ignoring established testing practice.
  

------------------------------------------------------------------------
Bob Binder           http://www.rbsc.com      RBSC Corporation
rbinder@ r b s c.com Advanced Test Automation 3 First National Plz 
312 214-3280  tel    Process Improvement      Suite 1400
312 214-3110  fax    Test Outsourcing         Chicago, IL 60602

In This Thread