473,320 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

TDD doesn't suck

Cers:

The majority of the world's legacy software is written in C.

However, the market leader in new code is Java. The language is technically
inferior, and its success depends on two props. One of them is Sun's
marketing machine.

The other is JUnit. This is the flagship system in a host of Free Software
tools that assist Test Driven Development. It leads related tools, like
CruiseControl and Fitnesse, which help Java shops rapidly ship stable
software, overcoming the language's technical problems.

Put another way, the unique power of TDD to avoid debugging and streamline
development is partly responsible for Java's false appearance of success.
When you see Java's numbers, you see an effect of TDD.

So it seems to me that people interested in maintaining majority of the
world's legacy codebases, and people interested in competing with Java via
technology (not marketing), would do well to learn TDD.

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!
Aug 9 '06 #1
36 2242
On Wed, 09 Aug 2006 23:01:35 GMT, "Phlip" <ph******@yahoo.comwrote:
>Cers:

The majority of the world's legacy software is written in C.
If you think that statement makes your post topical, you're wrong.

--
Al Balmer
Sun City, AZ
Aug 10 '06 #2
Phlip said:
Cers:

The majority of the world's legacy software is written in C.

However, the market leader in new code is Java.
Java - a language which, in theory, has no pointers. But many of us have
seen the "Java null pointer exception" message at the bottom of a public
access terminal screen and "out of order" scrawled on a piece of card to
warn you away. If you wanted a good showcase for TDD, I think you picked
the worst possible example.
Put another way, the unique power of TDD to avoid debugging
....appears to result in buggy software. See above.

If you want to sell TDD in comp.lang.c, (a) don't, but (b) if you're going
to ignore that advice anyway, at least sell it in comp.lang.c terms, by
providing an example implementation of TDD written in very, very portable
ISO C.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Aug 10 '06 #3
Richard Heathfield wrote:
>The majority of the world's legacy software is written in C.

However, the market leader in new code is Java.

Java - a language which, in theory, has no pointers. But many of us have
seen the "Java null pointer exception" message at the bottom of a public
access terminal screen and "out of order" scrawled on a piece of card to
warn you away. If you wanted a good showcase for TDD, I think you picked
the worst possible example.
I never said Java was invented with TDD.

TDD currently props up much of the development in an otherwise sucky
language. The language's low quality requires the high quality of TDD just
to break even.

I suspect I made that point very clearly, in the prose you snipped.

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!
Aug 10 '06 #4
Richard Heathfield wrote:
If you want to sell TDD in comp.lang.c, (a) don't, but (b) if you're going
to ignore that advice anyway, at least sell it in comp.lang.c terms, by
providing an example implementation of TDD written in very, very portable
ISO C.
That's a non-sequitur. TDD is a technique, not a piece of code. And you are,
again, muddying the topicality issue, by appealing to portability.

A test rig for C appears here:

http://sourceforge.net/projects/cut

It enables the TDD coding cycle, but I don't know where any source code
produced thusly is. What would such code prove?

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!
Aug 10 '06 #5
Richard Heathfield <in*****@invalid.invalidwrote:
Java - a language which, in theory, has no pointers. But many of us have
seen the "Java null pointer exception" message at the bottom of a public
access terminal screen and "out of order" scrawled on a piece of card to
warn you away. If you wanted a good showcase for TDD, I think you picked
the worst possible example.
<ot>I don't think the case for or against TDD has anything to do with
the dreaded NPE. C has just as many errors caused by dereferencing
null pointers, except that Java helpfully throws an exception rather
than unleashing nasal daemons.
Put another way, the unique power of TDD to avoid debugging
...appears to result in buggy software. See above.
TDD does not preclude the need for debugging, if only because mere
mortals are as unlikely (on the first try) to code the test correctly
as they are the actual code.</ot>
If you want to sell TDD in comp.lang.c, (a) don't, but (b) if you're going
to ignore that advice anyway, at least sell it in comp.lang.c terms, by
providing an example implementation of TDD written in very, very portable
ISO C.
TDD doesn't seem to be a paradigm well-suited for C, since many of the
language features that make Java amenable to TDD (language support
and/or syntactic sugar to facilitate OOP, exceptions, etc.) are not
available in C.

--
C. Benson Manica | I *should* know what I'm talking about - if I
cbmanica(at)gmail.com | don't, I need to know. Flames welcome.
Aug 10 '06 #6
Phlip <ph******@yahoo.comwrote:

(WRT TDD in Java)
TDD currently props up much of the development in an otherwise sucky
language. The language's low quality requires the high quality of TDD just
to break even.
Perhaps you'd like to take your opinions regarding what makes Java
"sucky" to a different venue? (Followups set to
comp.lang.java.programmer, if you're so inclined.)

--
C. Benson Manica | I *should* know what I'm talking about - if I
cbmanica(at)gmail.com | don't, I need to know. Flames welcome.
Aug 10 '06 #7
Christopher Benson-Manica wrote:
>
TDD doesn't seem to be a paradigm well-suited for C, since many of the
language features that make Java amenable to TDD (language support
and/or syntactic sugar to facilitate OOP, exceptions, etc.) are not
available in C.
I agree with some of this, C doesn't fit well with the <pick your
language>Unit frameworks.

My workaround is to use a C++ framework for the tests. Sounds messy but
works well. I'm sure many C programmers would prefer an all C solution.

--
Ian Collins.
Aug 10 '06 #8
Phlip said:

<snip>
>
A test rig for C appears here:

http://sourceforge.net/projects/cut
Thank you. I'll take a closer look if and when I get time, energy,
motivation and coffee in the right mix. Incidentally, my principal
objection to your TDD evangelism is that it is too woolly; in the past,
you've appeared (to me at least) to be evasive when it comes down to actual
details of how to /do/ TDD. Now that you've shown me your source code, you
may just have a convert - but don't hold your breath, as I have other stuff
to do in the next week or three, so "cut" will have to wait a while.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Aug 10 '06 #9
Christopher Benson-Manica <at***@otaku.freeshell.orgwrites:
Phlip <ph******@yahoo.comwrote:

(WRT TDD in Java)
>TDD currently props up much of the development in an otherwise sucky
language. The language's low quality requires the high quality of TDD just
to break even.

Perhaps you'd like to take your opinions regarding what makes Java
"sucky" to a different venue? (Followups set to
comp.lang.java.programmer, if you're so inclined.)
I've set followups back to comp.lang.c.

Whatever you may think of the topicality or appropriateness of Phlip's
posting, he was smart enough *not* post a statement that Java is
"sucky" to comp.lang.java.programmer. You, however, chose to quote
that statement and dump it into that newsgroup. This is inappropriate
and trollish. One might assume you're trying to start a flame war; I
hope the folks in cljp don't take you up on it.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Aug 10 '06 #10
Richard Heathfield wrote:
Phlip said:
>Cers:

The majority of the world's legacy software is written in C.

However, the market leader in new code is Java.

Java - a language which, in theory, has no pointers.
Java is /littered/ with pointers. What it doesn't have is pointer
arithmetic. Different choices for different styles of programming.
But many of us have
seen the "Java null pointer exception" message at the bottom of a public
access terminal screen and "out of order" scrawled on a piece of card to
warn you away.
(Really? Coo. That would be gobsmackingly stupid code that can't handle
an exception at the top level. Oh well, life is full of suprises.)
If you wanted a good showcase for TDD, I think you picked
the worst possible example.
I am much less certain that Phlip is that widespread Java code has
been built using TDD (even if it is JUnited). I think we have a
clear case of not being able to tell ...
>Put another way, the unique power of TDD to avoid debugging

...appears to result in buggy software. See above.
No evidence from the above. (Anecdotally, /I/ have found using TDD has
helped /my/ Java software development, and I wouldn't work in Java
without it (or a superior substitute if one appeared)).
If you want to sell TDD in comp.lang.c, (a) don't, but (b) if you're going
to ignore that advice anyway, at least sell it in comp.lang.c terms, by
providing an example implementation of TDD written in very, very portable
ISO C.
[Nitpick: you don't implement TDD; you implement the test framework, and do
TDD over it.]

I want one.

--
Chris "but I also want exceptions" Dollin
Meaning precedes definition.

Aug 10 '06 #11
In comp.lang.c Keith Thompson <ks***@mib.orgwrote:
Whatever you may think of the topicality or appropriateness of Phlip's
posting, he was smart enough *not* post a statement that Java is
"sucky" to comp.lang.java.programmer. You, however, chose to quote
that statement and dump it into that newsgroup. This is inappropriate
and trollish. One might assume you're trying to start a flame war; I
hope the folks in cljp don't take you up on it.
What I really wanted was simply for OP to elaborate on the statement -
I'm genuinely interested to know what about Java OP believes is
fundamentally bad. I suppose I would have been better off directing
the conversation to, say, comp.programming, but surely we can at least
agree that comp.lang.c isn't the place to continue the discussion.

--
C. Benson Manica | I *should* know what I'm talking about - if I
cbmanica(at)gmail.com | don't, I need to know. Flames welcome.
Aug 10 '06 #12
In article <vu********************@bt.comin*****@invalid.invalid writes:
Phlip said:

<snip>

A test rig for C appears here:

http://sourceforge.net/projects/cut

Thank you. I'll take a closer look if and when I get time, energy,
motivation and coffee in the right mix.
There actually is not much activity there. I see two open calls in the
bug tracking system, both over three years old. And the last release
is also over three year old. And since over a year the documentation
is no longer available, the only documentation available is the Readme
file for the oldest version. So you can have a closer look, but the only
thing you will find is the source and another Readme file.
--
dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
Aug 10 '06 #13
Dik T. Winter wrote:
http://sourceforge.net/projects/cut
There actually is not much activity there.
This thread ain't about what's the best C unit test rig. Google says this
one is:

http://cutest.sourceforge.net/

Curiously, JUnit is humongous and full of features, and these C versions are
tiny. All a unit test rig needs to do is enable the Test/Code/Refactor
cycle, so maybe JUnit is big because Java is a superior language. ;-)

Christopher Benson-Manica wrote:
What I really wanted was simply for OP to elaborate on the statement -
I'm genuinely interested to know what about Java OP believes is
fundamentally bad.
Richard Heathfield said it best: Java - a language which, in theory, has no
pointers. But many of us have seen the "Java null pointer exception" message
at the bottom of a public
access terminal screen...

So Sun invented Java to fit the marketing pitch "this language is safer than
that horrible C++, which slows your engineers down with lots of bugs".
Defining Java in the negative - removing innocent features from C++ and
adding nothing - simply left Java open to grow a whole new category of bugs.
TDD does not preclude the need for debugging, if only because mere
mortals are as unlikely (on the first try) to code the test correctly
as they are the actual code.
Under TDD, you run all tests after the fewest possible edits. Usually less
than 10 statements, copies, etc. When a test fails unexpectedly, you only
have <10 edits to throw away, before all the tests pass.

You shouldn't even need to inspect the error to make the tests pass again.

With or without TDD, if you discover a bug that tests didn't catch, you must
debug, because you must preserve your investment in all the edits you made
between adding that bug and finding it. So "debug" means run the debugger,
add trace statements, and sleuth out the cause. Then it means fix the bug
without adding more bugs.

So the knob to set here is how proactive you want your tests, to improve the
odds you find your bugs as early as possible. As you write more tests first,
the rate of long-term bugs goes down, and the rate of punitive debugging
goes down.

Teams using TDD overwhelmingly report much less time spent debugging. Some
report they can code for years, and frequently ship product, without ever
activating a debugger.

Legacy situations typically require debugging, to research what's going on.
C is used close to the metal, so a C team using TDD would not expect to
never invoke a debugger. They would, however, report fewer instances of
punitive debugging.

Ian Collins wrote:
My workaround is to use a C++ framework for the tests. Sounds messy but
works well. I'm sure many C programmers would prefer an all C solution.
Here's a unit test for a C framework (based on Gtk+) using an all-C test
rig:

TEST_NEW (dia_canvas_item_create)
{
DiaCanvasItem *ti1 = NULL;
DiaCanvasItem *ti2 = NULL;

ti1 = dia_canvas_item_create (TYPE_TEST_ITEM, NULL);
TEST (ti1->parent == NULL);
TEST (ti1->canvas == NULL);
TEST (G_OBJECT (ti1)->ref_count == 1);

ti2 = dia_canvas_item_create (TYPE_TEST_ITEM, "parent", ti1, NULL);
TEST (ti2->parent == ti1);
TEST (TEST_ITEM (ti1)->children->data == (gpointer) ti2);

TEST (G_OBJECT (ti1)->ref_count == 1);
TEST (G_OBJECT (ti2)->ref_count == 2);

g_object_unref (ti1);
}

It tests that dia_canvas_item_create() creates a child item, then creates a
parent item with its child pointer set to the child.

Under TDD, if you didn't have that feature yet, you would write such a test
and get the TEST() lines to fail. (Those should generally be called
CHECK().) Then you write code to pass the test. Because you only write such
code to respond to a failing test, the tests touch every feature you need.

Richard Heathfield wrote:
...in the past,
you've appeared (to me at least) to be evasive when it comes down to
actual
details of how to /do/ TDD.
Now that you've shown me your source code...
Oh dear. I didn't write CUT. I did prompt Arjan Molenaar to write the
DiaCanvas tests, but he didn't get the "first part".

I humbly submit the following, which I _did_ write, to make up for my
wooliness:

http://flea.sourceforge.net/TDD_in_a_nut_shell.pdf
--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!
Aug 10 '06 #14
Phlip wrote:
Richard Heathfield wrote:
If you want to sell TDD in comp.lang.c, (a) don't, but (b) if you're going
to ignore that advice anyway, at least sell it in comp.lang.c terms, by
providing an example implementation of TDD written in very, very portable
ISO C.

That's a non-sequitur. TDD is a technique, not a piece of code.
Which, I believe, makes it off-topic in clc. After all,
tail-recursion optimisation, building via makefiles vs IDE project
files, source control methods and forking (and/or threading)
are all also techniques and all equally off-topic.
And you are,
again, muddying the topicality issue, by appealing to portability.

A test rig for C appears here:

http://sourceforge.net/projects/cut

It enables the TDD coding cycle, but I don't know where any source code
produced thusly is. What would such code prove?
Aug 10 '06 #15
Phlip wrote:
Cers:
NOTE: this is off-topic here, perhaps it would be better
to discuss this in comp.programming?
The majority of the world's legacy software is written in C.

However, the market leader in new code is Java. The language is technically
inferior, and its success depends on two props. One of them is Sun's
marketing machine.

The other is JUnit. This is the flagship system in a host of Free Software
tools that assist Test Driven Development. It leads related tools, like
CruiseControl and Fitnesse, which help Java shops rapidly ship stable
software, overcoming the language's technical problems.

Put another way, the unique power of TDD to avoid debugging and streamline
development is partly responsible for Java's false appearance of success.
I fail to see how TDD is unique in any benefit it may offer.
When you see Java's numbers, you see an effect of TDD.

So it seems to me that people interested in maintaining majority of the
world's legacy codebases, and people interested in competing with Java via
technology (not marketing), would do well to learn TDD.
You have not sufficiently convinced me.

goose,
fups to comp.programming

Aug 10 '06 #16
Phlip wrote:
Cers:

The majority of the world's legacy software is written in C.

However, the market leader in new code is Java. The language is technically
inferior, and its success depends on two props. One of them is Sun's
marketing machine.

The other is JUnit. This is the flagship system in a host of Free Software
tools that assist Test Driven Development. It leads related tools, like
CruiseControl and Fitnesse, which help Java shops rapidly ship stable
software, overcoming the language's technical problems.

Put another way, the unique power of TDD to avoid debugging and streamline
development is partly responsible for Java's false appearance of success.
When you see Java's numbers, you see an effect of TDD.
Does this imply that "TDD" is not used by C programmers,
and that the way to do TDD is via general tools like JUnit ?
That's at best some silly assumtions.

Who's next after Phlip to tell us how to save the world btw ?
Aug 10 '06 #17
Phlip wrote:

<snipped>
I humbly submit the following, which I _did_ write, to make up for my
wooliness:

http://flea.sourceforge.net/TDD_in_a_nut_shell.pdf

Is there a plain text version of that? You /do/
know that many of us on dialup are browsing the
web using lynx, don't you?

goose,

Aug 10 '06 #18
goose wrote:
Is there a plain text version of that?
http://groups.google.com/group/comp....2c15e17cd04145

Whence: http://tinyurl.com/r8pna

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!
Aug 10 '06 #19
"Nils O. Selåsdal" said:

<snip>
Who's next after Phlip to tell us how to save the world btw ?
My turn, I think.

Now, folks, you're going to need two long pieces of string, a cereal packet,
some sticky-backed plastic, a washing-up-liquid bottle, and a sharp pair of
scissors...

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Aug 10 '06 #20
"Nils O. Selåsdal" wrote:
Phlip wrote:
>Cers:

The majority of the world's legacy software is written in C.

However, the market leader in new code is Java. The language is technically
inferior, and its success depends on two props. One of them is Sun's
marketing machine.

The other is JUnit. This is the flagship system in a host of Free Software
tools that assist Test Driven Development. It leads related tools, like
CruiseControl and Fitnesse, which help Java shops rapidly ship stable
software, overcoming the language's technical problems.

Put another way, the unique power of TDD to avoid debugging and streamline
development is partly responsible for Java's false appearance of success.
When you see Java's numbers, you see an effect of TDD.

Does this imply that "TDD" is not used by C programmers,
and that the way to do TDD is via general tools like JUnit ?
No.

(You do need something to make writing and running tests easy.)
That's at best some silly assumtions.
I'm not sure which, if any, of these Phlip is making.
Who's next after Phlip to tell us how to save the world btw ?
I'm game. But what does saving the world have to do with software
development?

--
Chris "we need Giles!" Dollin
"The path to the web becomes deeper and wider" - October Project

Aug 10 '06 #21
Phlip wrote:
goose wrote:
Is there a plain text version of that?

http://groups.google.com/group/comp....2c15e17cd04145

Whence: http://tinyurl.com/r8pna
Now that I've had a quick shufti at it, I have to say that
I don't really see what all the fuss is about. This just looks
like a formal method of testing code, no?

Okay, so you've got the coloured bars and you've added
in a few big words, but it still boils down to just
"test the code you've written", hmm?

I thought all professionals test each function/routine/etc
that they write, preferably keeping the test calls in
a seperate module and writing the test results to a single
output file.

I'm currently working on a (home/hobbyist) project were
my modules consist of a .c file and a .h file. A seperate
test.c file has routines named the same as the modules, to
test each module: e.g.
1. foo.c -all the foo_* functions.
2. foo.h -all the foo_* prototypes.
3. test.c -has function
int main(void)
bool foo (FILE *output)

When compiled, then linked and run, the main module
calls all the module fnuctions with a file that they
can write to (as verbosely as they see fit).

After it all ends, I can diff the results file with whats
in source control to check if anything went wrong, or add
it to source control if a new test function was added to
test.c.
How do the restrictions placed by TDD help in any way?

goose,

Aug 10 '06 #22
goose wrote:
Phlip wrote:
>>goose wrote:

>>>Is there a plain text version of that?

http://groups.google.com/group/comp....2c15e17cd04145

Whence: http://tinyurl.com/r8pna


Now that I've had a quick shufti at it, I have to say that
I don't really see what all the fuss is about. This just looks
like a formal method of testing code, no?

Okay, so you've got the coloured bars and you've added
in a few big words, but it still boils down to just
"test the code you've written", hmm?
Certainly not, it's more like "write the code you have tests for". The
tests come fist. That's the big difference.

>
How do the restrictions placed by TDD help in any way?
What restrictions?

--
Ian Collins.
Aug 10 '06 #23
Richard Heathfield wrote:
Now, folks, you're going to need two long pieces of string, a cereal
packet,
some sticky-backed plastic, a washing-up-liquid bottle, and a sharp pair
of
scissors...
Cue Monty Pythons's infamous "How to Do it" sketch!

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!
Aug 10 '06 #24
"Phlip" <ph******@yahoo.comwrote:
Dik T. Winter wrote:
http://sourceforge.net/projects/cut
There actually is not much activity there.

This thread ain't about what's the best C unit test rig. Google says this
one is:
Google makes value judgements, now? Good! Maybe you can ask _it_ what
the Gratest Evvurr!!! development strategy is, and leave such off-topic
tripe off comp.lang.c.

Richard
Aug 11 '06 #25
Richard Bos wrote:
>This thread ain't about what's the best C unit test rig. Google says this
one is:

Google makes value judgements, now?
It ranks pages based on how many other pages link to them, so it generally
collects a vote of the value judgements of all those page authors.
Good! Maybe you can ask _it_ what
the Gratest Evvurr!!! development strategy is
Well, Google's own programmers use TDD, so...

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!
Aug 11 '06 #26
Phlip wrote:
>
Cers:

The majority of the world's legacy software is written in C.
Well, you started out right. The majority of legacy softwre is
written in COBOL. (For scientific and engineering work, the
majority of legacy software is written in FORTRAN.)

--
+----------------------------------------------------------------+
| Charles and Francis Richmond richmond at plano dot net |
+----------------------------------------------------------------+
Aug 11 '06 #27
Charles Richmond wrote:
Phlip wrote:
>>Cers:

The majority of the world's legacy software is written in C.

Well, you started out right. The majority of legacy softwre is
written in COBOL. (For scientific and engineering work, the
majority of legacy software is written in FORTRAN.)

--
+----------------------------------------------------------------+
| Charles and Francis Richmond richmond at plano dot net |
+----------------------------------------------------------------+
All software is legacy anyway.

Before your fingers leave the keyboard, before you have time to
reflect, whatever you have written is just "legacy" for this
field that is always reinventing the "new and improved" wheel.

Yes, great invention the wheel. But it is a legacy application.
Aug 11 '06 #28
jacob navia wrote:
All software is legacy anyway.
The majority of the software that I use, that is still relevant to
programmers and users, that drives the internet, is written in...

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!
Aug 11 '06 #29
On Fri, 11 Aug 2006 10:57:07 GMT, "Phlip" <ph******@yahoo.comwrote:
>Good! Maybe you can ask _it_ what
the Gratest Evvurr!!! development strategy is

Well, Google's own programmers use TDD, so...
As I recall, you were challenged on that long ago, in another
newsgroup, and the whole thing sort of faded away ...

--
Al Balmer
Sun City, AZ
Aug 11 '06 #30
Al Balmer wrote:
Good! Maybe you can ask _it_ what
the Gratest Evvurr!!! development strategy is
Well, Google's own programmers use TDD, so...

As I recall, you were challenged on that long ago, in another
newsgroup, and the whole thing sort of faded away ...
http://www.xpsd.org/cgi-bin/wiki?PreviousPresentations

"July 6th, 2006

"Agile Software Development Case Study: Google

"Ian McFarland, a principal at Pivotal Computer Systems, and author of
Mastering Tomcat Development, will talk about applying Agile practices on
large, real-world projects, specifically drawing on his experiences with
Agile software development at one of the worlds fastest growling companies -
Google..."

The slideshow is members-only, but its TDD slide says this:

Code Quality and TDD

* In one application built on the platform, one
subsystem was not test-driven, and not developed
using agile practices

* One non-Agile, non-TDD subsystem comprised
<10% of the code, but was the source of ~75% of
the bugs

* The non-Agile subsystem missed its release dates,
and pushed the release date of the whole
application, by 4 weeks. (From a 12 week planned
release cycle.)

So not only do they use it, but they did the in-house research needed to
show it works. For them.

Oh, and it probably wasn't C. ;-)

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!
Aug 11 '06 #31
On Fri, 11 Aug 2006 17:31:38 GMT, "Phlip" <ph******@yahoo.comwrote:
>Al Balmer wrote:
>Good! Maybe you can ask _it_ what
the Gratest Evvurr!!! development strategy is

Well, Google's own programmers use TDD, so...

As I recall, you were challenged on that long ago, in another
newsgroup, and the whole thing sort of faded away ...

http://www.xpsd.org/cgi-bin/wiki?PreviousPresentations
The previous discussion I remember was some time ago, and it turned
out that Google was in the process of contemplating Agile development
techniques. (Although the implication then, as now, was that Google
used it widely and routinely.) It may be that this study was the
outcome of that contemplation. Unfortunately, it's not possible to
critique the study from the information provided.
>"July 6th, 2006

"Agile Software Development Case Study: Google

"Ian McFarland, a principal at Pivotal Computer Systems, and author of
Mastering Tomcat Development, will talk about applying Agile practices on
large, real-world projects, specifically drawing on his experiences with
Agile software development at one of the worlds fastest growling companies -
Google..."

The slideshow is members-only, but its TDD slide says this:

Code Quality and TDD

* In one application built on the platform, one
subsystem was not test-driven, and not developed
using agile practices

* One non-Agile, non-TDD subsystem comprised
<10% of the code, but was the source of ~75% of
the bugs

* The non-Agile subsystem missed its release dates,
and pushed the release date of the whole
application, by 4 weeks. (From a 12 week planned
release cycle.)

So not only do they use it, but they did the in-house research needed to
show it works. For them.

Oh, and it probably wasn't C. ;-)
--
Al Balmer
Sun City, AZ
Aug 11 '06 #32
Al Balmer wrote:
The previous discussion I remember was some time ago, and it turned
out that Google was in the process of contemplating Agile development
techniques.
They have been adopting them for years - specifically to clean up the
"continuous deployment" path between their engineers and their huge
server farm.

I found you an online version of the slide show:

http://www.javamug.org/mainpages/pre...-DallasJUG.pdf

( http://tinyurl.com/lb8sv )

Note that it's a slide show, not a peer-reviewed scientific paper in an
academic journal.

But note that Ian does not seem to mind touring with this slideshow,
and that might possibly imply he answers the occassional hard question.
(Although the implication then, as now, was that Google
used it widely and routinely.) It may be that this study was the
outcome of that contemplation. Unfortunately, it's not possible to
critique the study from the information provided.
http://weblogs.asp.net/rosherove/arc...02/273833.aspx
"Test Driven Development proves useful at Google"

These are notes on a slideshow, possibly Ian's:

"current status: very stable builds due to unit tests, better stability
in backwards compatibility due to unit and functional tests. More TDD
in future, with many more tests. Goal is to get to a stage where XP and
testing offers benefits beyond build stability and backwards
compatibility--much more quality in production software."

I think the vibe is a few years ago they were adopting, and nowadays
they are adopted, and not shy about it.

If you need more /argumentum ad auctoretatem/, you can also try
Microsoft. (Remember them?;)

--
Phlip

Aug 11 '06 #33
"Phlip" <ph******@yahoo.comwrote:
Richard Bos wrote:
This thread ain't about what's the best C unit test rig. Google says this
one is:
Google makes value judgements, now?

It ranks pages based on how many other pages link to them, so it generally
collects a vote of the value judgements of all those page authors.
Good! Maybe you can ask _it_ what
the Gratest Evvurr!!! development strategy is

Well, Google's own programmers use TDD, so...
....that proves that TDD does evil.

Richard
Aug 21 '06 #34
Ian Collins wrote:
goose wrote:
>How do the restrictions placed by TDD help in any way?
What restrictions?
You know, nuisances like "only write testable code". Stuff that infringes
our freedom as programmers to write whatever we like...

--
Phlip
The snakes on the plane prey mainly on the brain
Aug 21 '06 #35
Phlip wrote:
our freedom as programmers to write whatever we like...
vanishes to varying degrees whenever we work on a project with, for, or
managed by others...
Aug 21 '06 #36
Phlip wrote:
Ian Collins wrote:
goose wrote:
How do the restrictions placed by TDD help in any way?
What restrictions?

You know, nuisances like "only write testable code". Stuff that infringes
our freedom as programmers to write whatever we like...
If your religion can only be defended by
intentionally incorrect attributions, most
sane people will decide that it can't be
very good, then.

You want people to take you seriously? Stop
acting like an adolescent boy who just
discovered the second use of the penis.

I generally hate to come down heavily
on anyone, but I suggest that you bear in mind
that its difficult for people to think that
anything you suggest can be any good if
you have to resort to inflammatory and
flame-attracting statements to make your
point (see above).

I tried it, and reported on my experience
as honestly as possible (if anything,
I erred on the side of TDD in my reporting
so that I wouldn't unduly cast TDD in
a bad light). I basically compared what
I normally do with TDD and TDD came out
slightly behind; sorry - TDD would have come
out ahead if "the way I normally write code"
was a mess with no structure or forethought.

TDD, done like the way you said, had resulted
in an undetected bug in my toy project.
After detecting the bug (by *inspection*,
nogal), I fail to see a benefit at this point.
The code in question is downloadable from
www.lelanthran.com/downloads/os_mem

The fixed version (bug found accidently by
inspection) is downloadable from
www.lelanthran.com/downloads/os_mem2

Bug is in function find_ptr(), in
file os_mem.c. No test exists that would
have been certain of catching this bug.

Enjoy.

goose,
You might be able to see why I disbelieve
ridiculous claims if you weren't so
ego-invested into proving that TDD is
best for everyone, in every situation
and at all times. OTOH, I've not invested
my ego into proving or disproving TDD.
I think it's excellent for the
undisciplined or newbie developer.

Aug 21 '06 #37

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

149
by: Christopher Benson-Manica | last post by:
(Followups set to comp.std.c. Apologies if the crosspost is unwelcome.) strchr() is to strrchr() as strstr() is to strrstr(), but strrstr() isn't part of the standard. Why not? --...
10
by: Ruediger Klaehn | last post by:
Sorry about the harsh language, but I have to vent my anger to somebody who actually understands what I am talking about. Complaining to my girlfriend is not going to produce any meaningful results...
93
by: Dave | last post by:
I am a VB.NET guy, recently i tried to write program using C#, having being pampered by VB.NET's IntelliSense i find that the C#'s IntelliSense is SUCK!
4
by: Matthew Crouch | last post by:
i suck so much that i don't even know if this is a JOIN or a subquery or who-knows what. Here's the idea: I want to select two things at the same time (form one table) average for columnX and...
458
by: wellstone9912 | last post by:
Java programmers seem to always be whining about how confusing and overly complex C++ appears to them. I would like to introduce an explanation for this. Is it possible that Java programmers...
31
by: Bill Norton | last post by:
Over at PCMag.com there is a debate going on over the usability of CSS. The discussion was initiated by an article by John Dvorak called "Why CSS Bugs Me"...
6
by: Slonopotam845 | last post by:
Fat cock exploring on this crazy movie ;) ---------------------------------- http://community.ihostasp.net ASP.NET Developer Community
9
by: Chelong | last post by:
Hi All I am using the srand function generate random numbers.Here is the problem. for example: #include<iostream> #include <time.h> int main() {
7
by: Gary | last post by:
Hello guys! Bear with me, I am a newbie. She is the Data Warehouse manager. She has about 50 users to use the Oracle database from M$ Access via ODBC connection. All those users have only...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.