Duplication in code is generally considered bad, because it violates the DRY principle. Probably the only commonly accepted exception to the rule is documented in Extreme Programming Explained by Kent Beck. He says that the one higher priority (than removing duplicate code) in simple design is to ensure that the system "must communicate everything you want to communicate". In other words, the readers of the code need to be able to understand what it is doing by reading it.
Requirements in the form of Use Cases are no different in this sense. The Use Cases should ideally have no duplication within them, but it is actually more important that the readers of the requirements understand what is being described within them. In other words, if putting some duplication in helps your readers better understand what is going on, that's a good thing.
The main difference between these cases is the skill of the reader. The people reading the code are (probably) trained in how to design and write it. The people reading the Use Cases however are probably not trained. In many projects, Use Cases have to be signed off by representatives of the business with no training or experience in them at all. In such cases, being pragmatic about duplicating some sections of requirements may be perfectly appropriate.
Oh - and by the way, Use Cases are not design. If you end up with duplicate code as a result of having duplicated requirements, beat your developers with a stick. They should know better.
Comments
Removing duplication whilst retaining behaviour or specification necessitates replacing the duplication with something in its place, viz: an abstraction.
Developers have much more training (in my experience) in dealing with abstractions, they also have knowledge management tools for working with them (Ctrl-B, Alt-F7, etc). Business however just get to see documentation, with indexes and hyperlinks if they are lucky.
Perhaps technologies like TiddlyWiki can provide business people with the tools to make navigation around a use case more sophisticated. In TiddlyWiki one can name a piece of text and have it inlined elsewhere, the resulting web page has duplication but this doesn't come with the risk of divergent change.
Even though abstractions are a developers bread and butter they aren't going to be masters of them all the time, so perhaps inlining 'technologies' would be useful to them too.
http://en.wikipedia.org/wiki/Begging_the_question
http://en.wikipedia.org/wiki/Argumentum_ad_populum
Posted by: Stacy | January 20, 2007 03:28 PM
There's no question in my mind that technology could be better utilised in this situation. The big corporates in Australia still like to put use cases in MS Word documents on a LAN. Go figure.
Posted by: Marty Andrews | January 21, 2007 09:07 PM