Free Newsletters
Technology & Business Daily

InfoWorld
Log-in | Register

Interview: XP pioneer stumps for test-driven development

Ward Cunningham explains the positive reinforcement inherent to a test-first approach to programming

By Jon Udell  
August 01, 2003
 

A pioneer of Extreme Programming and test-driven development, Ward Cunningham is also the inventor of Wiki, a popular open source tool for Web-based collaboration. InfoWorld Test Center Lead Analyst Jon Udell asked him to reflect on lessons learned as a practitioner of TDD and to describe how FIT (Framework for Integrated Test) enables programmers and business analysts to collaborate on testing business scenarios.

Free IT resource

Open Source Business Conference (OSBC) May 22-23, 2007

Sponsored by OSBC

Free IT resource

Virtualization Insights from Top Experts - Learn how virtualization gets real!

Sponsored by Dell

InfoWorld: What's the driving motivation for test first (see Test before you leap for more on this development methodology)?

Cunningham: Not so much finding that last bug, but guiding the development in a way that doesn't require a lot of attention to details. Then you can think and act strategically. The best developers are now very interested in testing, but they want testing that benefits them immediately.

InfoWorld: What makes test-first feasible?

Cunningham: We presume that it's easy to write tests, and that wasn't always true. With Cobol, there was no way to reach into the middle of your program. Now it's much more likely that your program is a network of objects. You can reach in and grab any one of them.

InfoWorld: What are the social implications of test first?

Cunningham: Developers use tests to communicate with other developers. The social contract says, "Here's my code, do anything you want with it so long as you have and run my tests. You're unlikely to hurt me if you continue to pass those tests. If you do fail a test, come talk to me."

InfoWorld: Some say test first is sustainable because programmers get to do what they like: writing code, not documentation.

Cunningham: There may be some truth to that. However, when you're writing code, you're focused on a single goal. When you're writing a test, you're deciding, "Of all the goals I know I have, what goal will I focus on next?" It's a sequencing thing. Do I take a little step or a big one? And how am I going to check that step?

InfoWorld: People report that the constant positive reinforcement -- the green bar that means the tests have passed -- is a powerful motivator.

Cunningham: It's true. You take a step, it seems small, but you get that reinforcement -- it's done. It's amazing how little reinforcement we've gotten over the years as we've gone through weeks and months of coding; you can get almost into despair.

InfoWorld: Where does FIT come in?

Cunningham: How do you have a rich conversation about a program that doesn't yet exist? Nowadays we focus on the UI, but complex business scenarios -- like an out-of-sequence endorsement on an insurance contract -- don't show up on the screen. Fortunately, folks who think about such things tend to work out these cases on spreadsheets. With FIT we can turn that spreadsheet into a Web page that the software tests read and update.

InfoWorld: So the programmers and the business analysts are literally on the same page?

Cunningham: Yes. The person-to-person communication is still the richest source of insight into what's required. But at some point you want to write it down, you want to say, "Here are some examples in my language as a domain expert, please check them mechanically, as you do your work, so that my interests are protected in the same way yours are."





 


 
Jon Udell is lead analyst and blogger in chief at the InfoWorld Test Center.

  More of Jon Udell's column
  Jon Udell's Weblog

Newsletter Check out all of our free newsletters!
Enter e-mail address:




 

TOP NEWS:


»  You don't know tech: The InfoWorld news quiz
Match your weekly tech news wits against our snarky quiz master

»  Antitrust review of Google-Yahoo deal no surprise
While serious antitrust problems are unlikely, both Google and Yahoo expected their partnership to be subjected to instense DOJ scrutiny

»  Top 10: Coreflood, more Microsoft-Yahoo, iPhone plans
This week's wrapup of the top tech news stories includes more Microsoft-Yahoo rumors, iPhone updates, Flash searches, Oracle's BEA roadmap, and more

»  Four 'important' Microsoft patches due Tuesday
Not rated "critical," fixes apply to "Elevation of Privileges" and "spoofing" bugs for Windows, Exchange, and SQL

»  Judge grants RIM a stay in Visto patent trial
Trial delayed from beginning next week while patent office studies validity of certain parts of e-mail provider Visto's patents as requested by RIM

»  Developers satisfied with Apple's enterprise work
Mac developers feel that Apple shouldn't try to make a broad attempt to win over enterprises and should instead focus on certain areas within the enterprise




Remote Access: Maintain Security and Decrease the Burden on IT
Join this interactive webcast to discover how IT Managers can control access rights, end-user security settings and end-point authorization. Sponsor: Citrix(R) GoToMyPC(R) Corporate

»  Click here to view this Webcast
  Zombie PCs Are Attacking Your LAN
A recent study showed that malware-infected zombie PCs are now a bigger threat to ISPs and Web infrastructure than DoS attacks. As this brand new IT Strategy Guide explains, an increased use of peer-to-peer techniques by the attackers has made it harder to fight back. Download now, compliments of Verio:

»  Click here to download now

- Special Advertising Partners -
WHITE PAPERS
 

» Technology White Papers Library

Technology White Papers by Topic

Technology White Papers E-mail Alert

Find out when the latest white paper is available:
 
 
INFOWORLD MARKETPLACE
 
» BUY A LINK NOW
 
SEE ALSO
• Test before you leap into development
• Unit testing for Java and .Net made simple and free
• Interview: Brian Marick digs into the evolution of testing


FIND PRODUCTS AND COMPANIES
» COMPLETE PRODUCT GUIDE



TECHNOLOGY INDEX
• Applications
• Application Development
• Security
• Networking
• Wireless
• Platforms
• Hardware
• Data Management
• Storage
• Web Services
• Business
• Telecom
• Professional Services
• Standards

TECH WATCH 


What's the 411 on GOOG-411?
Just as Google has become synonymous with "performing a Web search," 411 is understood to mean "information" -- as in "what's the 411?" I was thus surprised to discover, from a billboard, no less, that the king of search is taking on the ...

Apple HTML source reveals 'iPhone Extreme'
"This one's a stretch..." reports AppleInsider. Um, yeah. Reporting on HTML code sightings of product names could be called a stretch, but iPhone Extreme has a ring to it. Now, that sounds like the product Apple should have released first, rather ...

COLUMNISTS

Unified under law
Ephraim Schwartz's Column and Blog (InfoWorld) - In the litigious world we live in, deploying a unified communications platform in your enterprise could...
» MORE COLUMNISTS

MORE INFOWORLD BLOGS


Open Sources 
Product Management
When I joined MySQL four years ago, there was quite a lot of debate about product management. We didn't actually have ...

Zero Day 
Botnet herders tending smaller flocks
New research backs up the theory that botnet operators are keeping their networks smaller in a continued effort to keep ...



• Advice Line
• Database Underground
• The Deep End
• Enterprise Mac
• Geeks in Paradise
• Grid Meter
• The Gripe Line
• InfoWorld Daily
• Inside IT
• IT Troubleshooter
• ITXtreme
• Open Sources
• ProdBlog
• Real World SOA
• Reality Check
• Security Adviser
• SMB IT
• The Storage Network
• Tech Watch
• Virtualization Report
• Zero Day

ADVERTISEMENT


RESOURCE CENTERadvertisement 

GOVERNMENT IT & POLICY
'If you don't go after the network, you're never going to stop these guys. Never.'
From the State Department, All the News for Inquiring Minds
TechPresident, the Internet Citizenry's New Consensus Taker



Sponsored Technology Links

 
 
 HOME  NEWS  BLOGS  PODCASTS  VIDEOS  TECHNOLOGIES  TEST CENTER  EVENTS  CAREERS   About | Advertise | Awards | RSS | Contact Us 

Copyright © 2008, Reprints, Permissions, Licensing, IDG Network, Privacy Policy, Terms of Service.
All Rights reserved. InfoWorld is a leading publisher of technology information and product reviews on topics including viruses,
phishing, worms, firewalls, security, servers, storage, networking, wireless, databases, and web services.

CIO :: ComputerWorld :: CSO :: Demo :: GamePro :: Games.net :: IDG Connect :: IDG World Expo
Industry Standard :: IT World :: JavaWorld :: LinuxWorld :: MacUser :: Macworld :: Network World :: PC World :: Playlist