CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jeremy D. Miller -- The Shade Tree Developer

Under the hood and working with .Net, TDD, Software Design, and Agile Stuff

"Code Complete" is a lie, "Done, done, done" is the truth

Before you flame me, I'm not talking about the canonical book by Steve McConnell.  What I mean is that this statement is a lie - "we're code complete on feature xyz."  That phrase is a lie, or at least misleading, because you really aren't complete with the feature.  Code complete doesn't tell you anything definitive about the quality of the code, or most importantly, the readiness of the code for actual deployment.  Code complete just means that the developers have reached a point where they're ready to turn the code over for testing.  You say the phrase "code complete" to mark off a gate on a schedule or claim earned credit for coding work done on a project schedule.  Using "code complete" to claim earned value is a bald-faced lie because it doesn't translate into business value - yet.  It could have lots of bugs and issues yet to be uncovered by the testers.  If the code hasn't gone through user acceptance testing, it might not even be the right functionality.

It's a nearly arbitrary status anyway.  Oftentimes a team will call something code complete just because the date on the schedule says its supposed to be code complete on that date.  Just call it code complete to satisfy the schedule, all software has bugs anyway right?  Code complete is one of many common evils on waterfall projects when team members have somewhat divergent goals.  Developers may be judged by meeting the code complete date, and the testers by the quality of the system - i.e. the lack of bugs.  These conflicting goals can easily have a negative impact on the project.

One of my favorite aspects of XP development has been the emphasis on creating working software instead of obsessing over intermediate progress gates and deliverables.  In direct contrast to "Code Complete," XP teams use the phrase "Done, done, done" to describe a feature as complete.  "Done, done, done" means the feature is 100% ready to deploy to production. 

There's quite a bit of variance from project to project, but the "story wall" statuses within an iteration I learned on my first XP project were:

  1. Not started
  2. Development
  3. Business Analyst Review (The developers called it "BA Volleyball," I think this was a process smell)
  4. Testing
  5. Customer Review
  6. Done, done, done

The other story wall columns besides "done, done, done" are just intermediate stages that help the team coordinate activities and handoffs between team members.  We use a Scrum style burndown chart to track intermediate progress in an iteration, but it's nothing better than an educated guess of status.  The burndown chart informs management on the state of the iteration and helps spot problems and changes in the iteration plan, but the authoritative progress meter is the number stories crossing the line into the "done" column.  The goal of the XP team in any given iteration is to get every story in play into the "done, done, done" column before the end of the iteration.  No credit or progress is earned on an XP project until a user story has been coded, fully tested, and approved by the business customer.  It's a draconian measure for a team, but it's an accurate indication of how much business value an XP team has really delivered.  XP nirvana is being able to consistently push all iteration stories into the "done, done, done" column and produce a potentially deployable release at the end of every iteration.  It's a lofty goal that most XP teams probably don't meet, but that doesn't mean we should stop trying to reach that goal.  Like so many agile teams we struggle with leaky iterations because we aren't fully driving stories to production-ready completion within an iteration, but that's the topic for my next post...

A friend of mine who's still mired in waterfall land challenged me one time on how an XP can know their status without a detailed plan.  My response was that our status was measured by what new features were ready to deploy.  If you think about it, that's a far more useful measurement than saying x number of features are "code complete" with unknown quality attributes. 

A very important attribute of agile methods in general is the entire team sharing a common goal to produce working software.  My experience has been that developer/tester interaction is far smoother in agile projects (certainly not perfect of course), in no small part because the developer's purview moves from getting code into test to getting code to a potentially deployable state.  As an agile developer it's in your best interest to do everything possible to make testing go smoothly - helping with test automation, build automation, unit testing, etc.  Testers are your allies now, not sparring partners.



Comments

Jeremy D. Miller -- The Shade Tree Developer said:

In my last post I talked a little bit about the difficulties that my team is facing in driving the user...
# April 17, 2006 9:08 PM

Sam Gentile said:

Again another month and change since the last one so this issue will be a collection of everything marked...
# May 17, 2006 11:30 AM

Jeremy D. Miller -- The Shade Tree Developer said:

Between being extremely short handed at work, tech' reviewing a new book, a
possible book proposal...
# August 7, 2006 4:51 PM

Jeremy D. Miller -- The Shade Tree Developer said:

Between being extremely short handed at work, tech' reviewing a new book, a possible book proposal

# September 1, 2006 2:32 PM

Jeremy D. Miller -- The Shade Tree Developer said:

I'm starting my new job today and kicking off a new project this week. The organization is relatively

# October 2, 2006 4:10 PM

Jeremy D. Miller -- The Shade Tree Developer said:

Welcome to my stream of conscience series about topics that are popping up on a new team that's largely

# October 9, 2006 12:44 PM

Jeremy D. Miller -- The Shade Tree Developer said:

From a question on my Passive View blog post : "should we design for testability, or should we try

# June 29, 2007 8:53 AM

Sam Gentile said:

TGIF!! I am super busy right now designing a multi-CPU/multi-threaded Parallel Calculation Engine and

# June 29, 2007 1:15 PM

Designing for Testability « Tuff Stuff said:

Pingback from  Designing for Testability « Tuff Stuff

# July 4, 2007 4:39 AM

Jeremy D. Miller -- The Shade Tree Developer said:

To everybody that attended one of my talks at DevTeach this week. All of the materials are now online

# November 29, 2007 12:03 PM

Mark Turansky said:

I agree, I've also written that <a href="blog.markturansky.com/.../39">Code complete does not mean you're done</a>.

# February 22, 2008 8:49 AM

Jeremy D. Miller -- The Shade Tree Developer said:

Last week I gave a talk at Agile Austin entitled “How does design get done on an Agile Project?”&#160;

# July 6, 2008 11:46 PM

Community Blogs said:

Last week I gave a talk at Agile Austin entitled “How does design get done on an Agile Project?”&#160;

# July 7, 2008 12:35 AM

First Causes in Software Development: How do I decide what is good? | British Columbia Welcome U said:

Pingback from  First Causes in Software Development: How do I decide what is good? | British Columbia Welcome U

# September 17, 2008 2:01 PM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Jeremy D. Miller

Jeremy began his IT career writing "Shadow IT" applications to automate his engineering documentation, then wandered into software development because it looked like more fun. Jeremy previously worked as a systems architect building mission critical supply chain software for a Fortune 100 company and learned agile development practices as a .Net consultant at ThoughtWorks, one of the pioneers of agile development. Jeremy is the author of the open source StructureMap (http://structuremap.sourceforge.net) tool for Dependency Injection with .Net and the forthcoming StoryTeller (http://storyteller.tigris.org) tool for supercharged FIT testing in .Net. Jeremy's thoughts on just about everything software related can be found on his weblog "The Shade Tree Developer" at http://codebetter.com/blogs/jeremy.miller, part of the popular CodeBetter site. Jeremy is a Microsoft MVP for C#. Check out Devlicio.us!

Our Sponsors

This Blog

Syndication

News

All opinions expressed here constitute my (Jeremy D. Miller's) personal opinion, and do not necessarily represent the opinion of any other organization or person, including (but not limited to) my fellow employees, my employer, its clients or their agents.

About Me

"Best Of" Compendium

StructureMap (Dependency Injection for .Net)

StoryTeller (Supercharged Fit)

Build your own Cab

TestDriven

MVP