BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Cockburn on Testing: Real Programmers have GUTs

Cockburn on Testing: Real Programmers have GUTs

This item in japanese

Bookmarks
In an interesting follow up on the video which InfoQ posted about debate between Bob Martin and Jim Coplien on 'TDD, CDD and professionalism', Alistair Cockburn blogged on how too many people say 'TDD' when they really want to say that they have good unit tests (GUTs).

Alistair penned the following observation about the debate:

Bob, you started by saying TDD is writing the test before the code, and that it is the hallmark of the professional. At the end, you said the hallmark of the professional is to have good unit tests, and TDD is one way of achieving that.

He suggests that there is a  shift in assertion by Bob on what makes a true professional. Though Bob starts with TDD, he seems to agree that to be a professional you need to have good unit tests.

Alistair believes that, till date, there has been no good term for "good unit tests," as there is for TDD. Had there been a term like 'GUTs' for good unit tests then people could brag about GUTs without implying whether they were written before or after the code. In the extreme programming digest he mentioned:

The punchline is: we need a term for "I have good unit tests", distinct from when they got written.

Right now people who write unit tests make a strong distinction between those who write them before the code and those who write them after the code. A term like "GUTs" would help these two groups to come and talk on the same platform. Further, he mentions that, if that were the case, then:

... Bob could assert that having GUTs is the mark of the modern professional programmer. ...

... Bob could separately assert separately that TDD is a better way of getting GUTs, and ...

... Cope could counter that even mountains of GUTs don't cover the state space as well as CDD, ...

... etc ...

Alistair seems to agree that there is no discounting the fact that unit tests are important. Development teams might want to practice TDD or write test cases after the code, as per their comfort. What really matters is that they should have GUTs.


Editor's note: Like Archimedes, Alistair Cockburn had this Eureka! moment in the bathtub. He was reading our interview transcript at the time, proving that at least one Naked Agilist reads InfoQ. (Hint: follow the links, it will wipe that strange image from your mind :-)

Rate this Article

Adoption
Style

BT