Tuesday, 7 July 2009

Feedback is king

Have you seen these symptoms:

  • @ignore
  • maven.test.skip=true
  • Tests commented out

If so then you've probably been working on a project thats suffering from a lack of feedback.

Since the early 00's we've had the term "Continuous Integration", the essence of which being integrate often so you don't get a nasty surprise at the end. The problem here is that feedback is essentially a synchronous process, i.e. you have to be there to receive that information. Lets assume we've gotten into the healthy habit of atomic commits, say approx every 30 mins, how long are you prepared to wait to see if you've broken anything, 2 mins? 5 mins? What if your build process takes 60 mins? Would you wait? Probably not. In this situation one of two things tend to occur.

1.) Checkins continue at the same rate, which means that two subsequent checkins occur before checkin 1 has been tested. This usually means lots of wasted time reverting changes when bugs have been introduced.
2.) Checkin numbers are reduced to keep up to date with the build cycle, this causes more integration issues as the codebase across the team is out of sync for longer.

Eventually people stop relying on the build as an indication of stability and this is when you start seeing the aforementioned symptoms.

This almost certainly leads to brittle code, a decrease in velocity, an increase in bugs and a heavy reliance on manual testing.

So remember that builds need love and care to make sure they're as efficient as possible. Spend time making sure that heavy weight acceptance tests run in a separate target to your unit and integration tests and that your integration layers and tests are as thin as possible to make the rest of your code as light, as supple and as rapidly testable as possible.

No comments:

Post a Comment