Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > TDD doesn't suck

Reply
Thread Tools

TDD doesn't suck

 
 
Phlip
Guest
Posts: n/a
 
      08-09-2006
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!!!


 
Reply With Quote
 
 
 
 
Al Balmer
Guest
Posts: n/a
 
      08-10-2006
On Wed, 09 Aug 2006 23:01:35 GMT, "Phlip" <(E-Mail Removed)> wrote:

>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
 
Reply With Quote
 
 
 
 
Richard Heathfield
Guest
Posts: n/a
 
      08-10-2006
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)
 
Reply With Quote
 
Phlip
Guest
Posts: n/a
 
      08-10-2006
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!!!


 
Reply With Quote
 
Phlip
Guest
Posts: n/a
 
      08-10-2006
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!!!


 
Reply With Quote
 
Christopher Benson-Manica
Guest
Posts: n/a
 
      08-10-2006
Richard Heathfield <(E-Mail Removed)> wrote:

> 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.
 
Reply With Quote
 
Christopher Benson-Manica
Guest
Posts: n/a
 
      08-10-2006
Phlip <(E-Mail Removed)> wrote:

(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.
 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      08-10-2006
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.
 
Reply With Quote
 
Richard Heathfield
Guest
Posts: n/a
 
      08-10-2006
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)
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      08-10-2006
Christopher Benson-Manica <(E-Mail Removed)> writes:
> Phlip <(E-Mail Removed)> wrote:
>
> (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) http://www.velocityreviews.com/forums/(E-Mail Removed) <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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: TDD doesn't suck Christopher Benson-Manica Java 1 08-10-2006 06:26 AM
C++ test framework for TDD Alexander Eisenhuth C++ 3 11-16-2005 06:58 PM
[Snippet] a Recursive Descent Parser via TDD - recursiveDescentParser.h Phlip C++ 6 08-05-2004 03:12 AM
[Snippet] a Recursive Descent Parser via TDD - test.h Phlip C++ 0 08-02-2004 07:59 PM
[Snippet] a Recursive Descent Parser via TDD - recursiveDescentParser.cpp Phlip C++ 0 08-02-2004 07:48 PM



Advertisments