[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: case against XP (was: PG: Hackers and Painters)





Vadim Nasardinov wrote:

> Mike Newhall wrote:
>  > I agree completely.  The whole "Extreme Programming" thing -- at
>  > least the "team coding" part -- never appealed to me.
> 
> You are going to like this:
> 
> http://www.softwarereality.com/lifecycle/xp/case_against_xp.jsp
> 
> 

This article make some good points but was obviously written by
someone who hasn't tried the approach, particularly in the area
of test-driven development.  Example:

"With XP, constant refactoring (i.e. constant tinkering and redesigning 
of your code) is supposedly possible because the automated tests will 
catch out any problems. That is, the tests will catch out all the bugs 
that have been thought of in advance, but no others. Last time I 
checked, most bugs are due to things that the programmer had not thought 
of."

This is what test-driven development looks like from the outside -- as 
if people wrote unit tests against their complete
understanding of the application and hence, potentially left things 
uncovered.  Test-driven development doesn't allow
a feature to be added to the application code unless it is put in to 
make a test work.  There is effectively _no_ code
that doesn't correspond to some unit test or other, so it's not easy to 
find holes in the test suite.  I know from
personal experience that refactoring is vastly easier and more reliable 
when the code has been developed using TDD.

"Sure, you can keep adding tests once the bug has been found by a 
diligent QA tester (or disparaging customer), but it's sort of too late 
then. Wouldn't it be so much better to concentrate on getting the code 
right first time round, recognising when that module is finished and 
moving on to some other part of the project that is more worthy of your 
attention?"

How, I wonder, are we supposed to "concentrate on getting the code right 
first time round"?  What about all those
"things the programmer has not thought of"?  What about the inevitable 
spec/design changes that will be coming around
later?  It sure would be nice to have an exhaustive suite of tests to 
make sure we're okay after we add that new
feature...

Okay, enough zealotry. :-)  Here's a link to an interesting article on TDD:

http://www.objectmentor.com/resources/articles/tfd.pdf