InfoQ

News

Cockburn on Testing: Real Programmers have GUTs

Posted by Vikas Hazrati & Deborah Hartmann on Mar 01, 2008 09:54 AM

Community
Agile
Topics
Delivering Quality ,
Agile Techniques ,
Unit Testing
Tags
Debate ,
Testing ,
Fun ,
Criticism ,
TDD
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 :-)

Related Sponsor

VersionOne is recognized by Agile practitioners as the leader in Agile project management tools. Companies such as Adobe, BBC, CNN, Dow, HP, IBM, Sony and 3M have turned to VersionOne to help deliver greater value to their customers.
GUTs at last by Antek Baranski Posted Mar 2, 2008 10:02 PM
waiting for GT's by deepak shetty Posted Mar 3, 2008 8:52 AM
Re: waiting for GT's by Jonathan Allen Posted Mar 3, 2008 8:49 PM
  1. Back to top

    GUTs at last

    Mar 2, 2008 10:02 PM by Antek Baranski

    I found this to be a refreshing look at Unit Testing as it’s something that I have been struggling with at my current work place where unit testing is note done, and talking about TDD is considered heresy. I still personally believe that TDD is the 'better' way of developing software, but the term GUTs may come very handy and act as a stepping stone for an organization that is used to shoot from the hip software development.

  2. Back to top

    waiting for GT's

    Mar 3, 2008 8:52 AM by deepak shetty

    Ah well , maybe someday Alistair Cockburn will change his philosophy to say "I have Good Tests" and stop quibbling about whether a test is a unit, integration or a functional test , but atleast some progress has been made.

  3. Back to top

    Re: waiting for GT's

    Mar 3, 2008 8:49 PM by Jonathan Allen

    I would be happy if people shut up about how important tests are and start talking about how to write good tests (of all varieties).

Educational Content

Bindings, Platforms, and Innovation

This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.

Orchestrating Long Running Activities with JBoss / JBPM

This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.

Neo4j - The Benefits of Graph Databases

This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.

Realistic about Risk: Software development with Real Options

This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.

Communication Flexibility Using Bindings

This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.

Writing DSLs in Groovy

After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.

Scaling Agile with C/ALM (Collaborative Application Lifecycle Management)

IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.

Concurrent Programming with Microsoft F#

Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.