home » blog » Agile Code Reviews: the Charrette Protocol

Closer is Better >> Nearsoft Blog

Matt Perez

Agile Code Reviews: the Charrette Protocol

Posted by Matt Perez on 02/02/2010 in code reviews , charrette protocol , Agile Software Development

Traditional code reviews are not much fun, particularly for the author.  They are very valuable, but can easily devolve into a bashing session.  Using the Charrette Protocol could be a more effective alternative that leaves the author in control and makes it more fun for everyone involved.  The charrette is also more in-line with Agile practices.

CharretteIn a one-pager, Kathy Juarez of Piner High School, Santa Rosa, California proposes adopting the Charrette Protocol for education, "to get feedback on a work in progress when a teacher, student, or group is ‘stuck’."  Kathy credits Carol Coe at Puyallup High School (WA) for describing the protocol.

As I read it, it struck me that this protocol would fit quite well in software development as a complement to code reviews.

I particularly like the idea that the charrette empowers the person asking for it which is quite the reverse of traditional code reviews.

Code Reviews

Traditional code reviews are a supervisory function, a "grading" event.  They are not much fun for participants, and, in particular,  they are not fun for the author whose code is being reviewed because they can easily devolve into a bashing session.

There are two types of traditional code reviews: Gatekeeper and Episodic code reviews.  In Gatekeeper reviews, gatekeepers review new code before it can be checked into the source base.  In some cases, one or a few developers are assigned permanently to this task; in other cases, any developer can play the role of reviewer.  But one way or the other, somebody has to review the code before it is checked-in.  This is a good practice, key to successful continuous integration and orthogonal to charrette.  (Charrettes are also orthogonal to techniques such as Pair Programming that embody a certain level of review.)

In Episodic reviews, a developer presents his code to a team of his peers for the purpose of having the team critique the code, make suggestions for improvements, find gaps in the design, find coding bugs, etc.  Although nothing prevents an author to call for a review, it is rarely done voluntarily; most often, reviews are imposed on developers as part of the development process.  Even in cultures that welcome code reviews and understand their value, Episodic reviews are conducted as an evaluation of the code in question (and as many see it, of its author as well).  That's why they're called reviews.

The Charrette Protocol

Here's the Charrette Protocol, adapted for software development,

  1. A developer or team (i.e., the requester) calls for a charrette whenever it is stuck or when they are working on some particularly tricky code or design.
  2. A team of advisors designated by the requestor joins the charrette.
  3. A moderator/facilitator is designated from the joint team to observe the charrette, ask questions along the way and keeps track of any action items.
  4. The requester presents the "work in progress" while the advisors listen.
  5. The requester states what it needs or wants from the charrette, thereby accepting the responsibility of focusing the discussion. This can take the form of a specific request or it can be as generic as "How can we make this better?" or "What should we do next?"
  6. The advisors then discuss while the requester listens and takes notes. There are no hard and fast rules here. Occasionally (but not usually) the requester joins in the discussion process. The emphasis is on improving the work, which now belongs to the entire group. The atmosphere is one of "we're in this together to make a good thing even better."
  7. When the requester gets what it needs from the advisors, he/she/they stop the process, briefly summarize what was gained, thank the advisors and moderator and return to the drawing board.

Empowering and Agile

The charrette flips the Episodic review on its head in that 1) the author or authoring team calls for it when they want feedback or help from others with a fresher perspective, different skills, etc. and 2) instead of waiting to review "finished" code, the charrette is done for work in progress.  As Kathy Juarez points out, this is "a low stakes/no stakes environment, where the requesting team has much to gain from the process and virtually nothing to lose."

The fact that charrettes are done around work in progress means that they can be done as often as needed and not at some mythical "end of coding."

Yeah for Twitter and Serendipity!

BTW, I found Kathy Juarez' write up through a @shelisrael retweet of a @paulallison post.  Interestingly, I found it through one of @paulallison's other posts, not the one retweeted by @shelisrael.

TweetBacks (Tweet this post)

Trackback(0)

TrackBack URI for this entry

Comments (4)


Show/hide comments
Charrette idea
0
Adopting the design charrette from architecture is an excellent idea. Thanks for the tip! The "control" aspect is key particularly on teams who haven't had the time together to build the level of trust necessary to separate ego from quality code.
Bob MacNeal , 02/02/2010 08:50:02 | url
Did not know there was a name for this.
0
I did not know there was a name for this... sounds like the way a healthy team collaborates: Someone has a problem, and so he asks for help, other team members come to help, not to judge, the person with the problem explains it, and the others try to help... and eventually and the problem gets fixed (sometimes the even the act of explaining so helpful that by the time the person with the problem has explained it, she already knows the solution. smilies/grin.gif

Now, while this does work (in my opinion) as an excellent practice to avoid getting stuck in a problem, I am not sure that it is a complete replacement for traditional code reviews, because it depends on the developer having "Conscious Incompetence" for the particular programming task at hand (she knows she might be doing something wrong). In other words, she needs to know she is getting into trouble. If the developer is at the "Unconscious Incompetence" level (she is not aware that what she is doing is wrong), she will not call for a charrette... and his mistakes will be ignored until they explode... probably in the customer face... It is for those cases that it is still valuable to have traditional code reviews... smilies/wink.gif
Francisco , 02/04/2010 12:44:03 | url
Re: Charrette idea
Matt Perez
Bob, You really have a talent for the succinct (I've been checking out your blog). I love how you put it, "separate ego from quality code." Yes, that's a big win of this technique.
Matt Perez , 02/05/2010 01:40:33
Re: Did not know there was a name for this.
Matt Perez
Francisco,

I agree that you'd have to be careful when deploying the Charrette Protocol. Developers have to have "conscious incompetence" and the culture has to support it. If people get punished (e.g., ridiculed) when asking for help, they won't do it, even when they are aware that they could use help.

In fact, culture is the best teacher for things like this. If a junior developer sees the CTO call for her own Charrettes, then, naturally he'll call them, too.

On the other hand, in a command-and-control culture, Charrettes probably will not work (i.e., they will not happen often, if at all).

You are dead on the value of asking for help and the fact that the mere act of asking moves towards the solution.

The main reason I am proposing this approach, is that, in my experience, Episodic Reviews are right up there with root canals and they either don't happen or, if they do, they are exhausting and oftentimes demoralizing. They are not very Agile, either, in that they are dependent of "finished code" (I don't know about you, but I have no idea what that is, really).

If Reviews are happening and they are working, then by all means keep on doing them. Otherwise, the Charrette Protocol is a good alternative.
Matt Perez , 02/05/2010 01:41:14

Write comment

smaller | bigger

busy