Daniel Irvine on building software
System design documentation, the lazy way
13 June 2012
I can teach you to write truly awesome agile documentation and still be lazy at it.
Actually, there’s nothing new here. It’s just plain old common sense, although I don’t often see it put into practice. In an agile team a great deal of responsibility is put on developers to be continually producing good documentation of two forms:
- story analysis and design proposal, in other words the bit of work when you go away and figure something out, then write it down in order to communicate your ideas with the rest of your team. Sometimes you won’t write this out, but you’ll have to communicate this design with your peers at some point (assuming they are interested).
- system design documentation, a larger set of documentation that describes in detail how the system operates, and why it works that way.
- When you start analysis on a new feature or user story, write out the minimum amount of prose that describes what you’re about to implement. Don’t detail obvious design decisions but only those that have required some heavy thinking. Make sure you write in the present tense, i.e. ‘The system does X because‘ not ‘The system should do X because’. Why we do this will become obvious a bit further on.
- Re-read and cut it down even further - remember, conciseness is key. Bullet points can be useful here.
- Send it out to your team for comment (or just discuss it face-to-face).
- Make any necessary changes to your document.
- Remove any parts of your document that you now feel are unimportant or that were ‘too obvious’ for comment from your team. This part is quite hard but important!
- Repeat 1-5 until you have agreement on the feature you’re about to implement.
- Implement in whatever way you see fit (test driven hopefully ;)).
- Open up the system design documentation for the area you’ve been working in, or create a new document if there is no documentation for the area you’ve just been working in. (This assumes you’ve got your system documentation organised in a functional way, which you should do. Wikis are great for this sort of documentation.)
- Merge in your analysis docs. This shouldn’t be difficult if you wrote your text in present tense. If you’ve used bullet points, fill those out so that they read as normal prose. You should be striving for textbook quality which means the document has to read well from start to finish.
- Throw away the analysis doc.
Some agile methodologists will tell you that you shouldn’t write any documentation until the feature is implemented. Well I think that unless you’re the perfect programmer, you’re going to slack off on the writing as soon as your implementation is done. You’ll be itching to move on to the next task. So do the writing up front and you’ll only have a quick documentation job to do at the very end of your implementation.