Specs are Bad?

Dusty tome

In the latest ObjectiveView object journal, OO guru Rebecca Wirfs-Brock chimes in on Linus Torvalds’ latest newsworthy rant.

Linus stated in a newsgroup posting: “So there's two MAJOR reasons to avoid specs: they're dangerously wrong. Reality is different, and anybody who thinks specs matter over reality should get out of kernel programming NOW. When reality and specs clash, the spec has zero meaning. Zilch. Nada. None.”

Rebecca Wirfs-Brock’s response had me nodding and saying “Yes, exactly!” several times. For example, she says:

“But that doesn’t mean specs have no value. Working, readable code isn’t the only thing that matters. It matters very much in the short and long term. But try understanding design rationale by just reading code. Or reading the test code.”

Some other, good sound bites:

  • “A spec. is an approximation of what is desired. I certainly don't expect it to tell me everything.”
  • “But if I need a spec, I write it. And if doesn’t reflect reality or is misunderstood, I change it if there is value in keeping it up to date. There may not be.”
  • “I prefer working code over piles of outdated, difficult diagrams and explanations. But that doesn't duck the issue. Specs aren't inherently bad.”

I’m in danger of quoting her entire article here, so it’s probably better if I just point you to the article and say “Do read it!”

Rebecca invented the way of thinking about objects known as Responsibility-Driven Design. Her book Object Design: Roles, Responsibilities and Collaborations seems to be one of the industry's best-kept secrets - well worth a look.

About the Author

Matt Stephens is a senior architect, programmer and project leader based in Central London. He co-wrote Agile Development with ICONIX Process, Extreme Programming Refactored, and Use Case Driven Object Modeling with UML - Theory and Practice.