InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Cockburn on Testing: Real Programmers have GUTs

Posted by Vikas Hazrati & Deborah Hartmann Preuss on Mar 01, 2008

Sections
Process & Practices,
Development
Topics
Agile Techniques ,
Unit Testing ,
Delivering Quality ,
Agile
Tags
Debate ,
Testing ,
TDD ,
Criticism ,
Fun
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

In today’s hyper-competitive world, later may be too late to adopt Agile development and this Roadmap for Success will help you get started. Download "Agile Development: A Manager's Roadmap for Success" now!

GUTs at last by Antek Baranski Posted
waiting for GT's by deepak shetty Posted
Re: waiting for GT's by Jonathan Allen Posted
  1. Back to top

    GUTs at last

    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

    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

    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

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.