Exploration Through Example

Example-driven development, Agile testing, context-driven testing, Agile programming, Ruby, and other things of interest to Brian Marick
191.8 167.2 186.2 183.6 184.0 183.2 184.6

Mon, 08 Aug 2005

Counterexamples

In my thinking about tests as examples, I've been thinking of them as good examples:

The right system behaves like this. And like this. And don't forget this.

But what about counterexamples?

A system that did this would be the wrong system. And so would a system that did this.

There's some evidence that differences are important in understanding.

  • The linguist Ferdinand de Saussere taught that meaning of the word "boat" isn't "a small vessel for travel on water." Rather the meaning of "boat" is generated by contrast with other words like "ship", "raft", "yawl", "statue of a boat", etc. (Derrida would later go on to make perhaps too much of the fact that there's no limit to the recursion, since all those other words are also defined by difference.)

  • In the early '70s, Patrick Winston wrote a program that learned the concept of "arch" from a series of examples and "near misses". My copy of his book has long since gone to the place paperclips, coathangers, and individual socks go, so I can't check if the near-miss counterexamples merely improved the program or were essential to its success.

  • My kids are now of the age (nine and ten) where they ask for dictionary-like definitions of words. But when they were younger, they more obviously learned by difference: they'd point at something, give the wrong name, then accept the correction without further discussion. ("Duck." "No, that's a goose." "Dog." "Yes, a nice dog.") Presumably the counterexamples helped with that amazing burst of vocabulary young kids have.

So what about those times when the programmer proudly calls the product owner over to show the newest screen and watches her face fall just before she says, "That's not really what I had in mind"? Or those times when a small group is talking about a story and a programmer pops up with an idea or a supposed consequence that's wrong? That's an opportunity to - briefly! - attend to what's different about the way two people are thinking.

Does anyone make explicit use of counterexamples? How? What have you learned?

## Posted at 20:05 in category /ideas [permalink] [top]

Link: Crispin on test-first customer tests

Lisa crispin has a nice, short article on how her team uses business-facing tests to drive development. A couple of points I particularly like:

  • Good examples of questions someone (often the tester) should ask about even a simple story.
  • An emphasis on just-in-time test creation.
  • How the need to support tests encouraged business logic to go in the right place.

## Posted at 11:07 in category /agile [permalink] [top]

About Brian Marick
I consult mainly on Agile software development, with a special focus on how testing fits in.

Contact me here: marick@exampler.com.

 

Syndication

 

Agile Testing Directions
Introduction
Tests and examples
Technology-facing programmer support
Business-facing team support
Business-facing product critiques
Technology-facing product critiques
Testers on agile projects
Postscript

Permalink to this list

 

Working your way out of the automated GUI testing tarpit
  1. Three ways of writing the same test
  2. A test should deduce its setup path
  3. Convert the suite one failure at a time
  4. You should be able to get to any page in one step
  5. Extract fast tests about single pages
  6. Link checking without clicking on links
  7. Workflow tests remain GUI tests
Permalink to this list

 

Design-Driven Test-Driven Design
Creating a test
Making it (barely) run
Views and presenters appear
Hooking up the real GUI

 

Popular Articles
A roadmap for testing on an agile project: When consulting on testing in Agile projects, I like to call this plan "what I'm biased toward."

Tacit knowledge: Experts often have no theory of their work. They simply perform skillfully.

Process and personality: Every article on methodology implicitly begins "Let's talk about me."

 

Related Weblogs

Wayne Allen
James Bach
Laurent Bossavit
William Caputo
Mike Clark
Rachel Davies
Esther Derby
Michael Feathers
Developer Testing
Chad Fowler
Martin Fowler
Alan Francis
Elisabeth Hendrickson
Grig Gheorghiu
Andy Hunt
Ben Hyde
Ron Jeffries
Jonathan Kohl
Dave Liebreich
Jeff Patton
Bret Pettichord
Hiring Johanna Rothman
Managing Johanna Rothman
Kevin Rutherford
Christian Sepulveda
James Shore
Jeff Sutherland
Pragmatic Dave Thomas
Glenn Vanderburg
Greg Vaughn
Eugene Wallingford
Jim Weirich

 

Where to Find Me


Software Practice Advancement

 

Archives
All of 2006
All of 2005
All of 2004
All of 2003

 

Join!

Agile Alliance Logo