Janek's weblog where all posts go to Eleven
All views and documentation expressed here are mine and not necessarily those of my employer.
A huge discussion has been going on in the Joel on Software forum: Rockstars vs. Unit Tests. It all started with Joel trying to illustrate the Yiddish terms rosh katan and rosh gadol. A day later his reader Tamir helped with a great explanation. I'm not going to copy it verbatim -- it comes down to "work to rule" and "do what is desired, not what is requested". What Joel describes as rosh katan respectively rosh gadol behavior of software developers makes a lot of sense.
In contrast, I can't agree with this:
For instance, in software development, we like to have people unit-test their code. However, a good, experienced developer is about 100 times less likely to write bugs that will be uncovered during unit tests than a beginner. It is therefore practically useless for the former to write these... but most methodologies would enforce that he has to, or else you don't pass some phase.
Maybe it's because I'm only a Wannabe Rockstar. But I find unit tests helpful; they are a my first line of defense. First, unit tests shield me from myself. It's hard to admit, but sometimes even The Wannabe Java Rockstar makes stupid mistakes. Second, they also protect against well-intentioned yet still wrong-doing coworkers.
In an ideal world, I'd work only with Rockstars. In reality I don't. That's why I value unit tests. Plus, they serve other purposes too. As Greg Luck says:
A suite of automatic regression tests, with high coverage, support safe refactoring of the code base. This benefit is less about testing in the sense of producing a high quality output, than in enabling developers to make changes without fear. In this sense tools like JUnit are very valuable.
Isn't that something even a True Rockstar can relate to?