Jeff's Blog

Musings about software development, Java, OO, agile, life, whatever.


Monday, January 05, 2009 
Code to Discuss

A good software team knows to talk openly about the code. One suggestion is to get together once a day, maybe at day end, to just talk about or look at some code, even if you are already pairing. The get-together need not take long nor be formal in any manner. Fifteen to thirty minutes should be sufficient. Toss some code up on the wall using an LCD projector and have at it.

Initially, such discussions can be touchy, as critique can be mistakenly viewed as insults or attacks. Over time, the regular exercise of discussing code should form a group that better understands how to communicate effectively with each other.

What to talk about? I brainstormed some ideas for a specific set of teams, things I knew they needed to discuss, and provide that starter list here. Given the almost limitless number of reasons to talk about the code, there is little excuse to forego the forum.

  • "here's something cool that I did today!"
  • "how could I better express this test?"
  • "here is a mocking technique I found valuable"
  • "this test didn't make sense to me"
  • "this area of the code concerns me"
  • test granularity
  • test naming
  • BDD
  • how TDD changed my design
  • naming standards
  • coding standards
  • warning standards
  • JUnit 4.4+: Hamcrest matchers, theories, etc.
  • "we're not writing enough tests"
  • code coverage (taking a look at the actual lines exercised by tests)
  • WTFs in the code or test. Can be amusing, but watch the toes!
  • test execution speed. Splitting into slow/fast suites.
  • identifying and speeding up slow tests
  • test smells
  • various forms of test double (see XUnit Patterns)
  • simple design vs SOLID
  • "we're not refactoring our production code enough"
  • "we're not refactoring our tests enough"
  • object mothers for tests
  • "the build is a pain in the rear"
  • looking at a new mock tool like Mockito
And so on. Perhaps get a volunteer (or two) to "open" a topic each week. They talk for a few minutes, and then you open things up for group discussion.


Comments: Post a Comment

Links to this post:

Create a Link



<< Home

RSS Feed (XML)

Archives

February 2004   March 2004   May 2004   September 2004   October 2004   January 2005   February 2005   September 2005   October 2005   November 2005   December 2005   January 2006   February 2006   March 2006   June 2006   August 2006   January 2007   February 2007   March 2007   April 2007   September 2007   October 2007   November 2007   December 2007   January 2008   February 2008   March 2008   April 2008   May 2008   June 2008   July 2008   August 2008   September 2008   October 2008   November 2008   December 2008   January 2009  

This page is powered by Blogger. Isn't yours?