Test Driven Development is Good
Last week, I was able to speak at the Engineering Excellence / Trustworthy Computing Forum, which is a Microsoft internal conference focused on writing better software. Some talks discuss experiences using new methodologies. Others focus on new tools that are available internally. Still others examine best practices.
The talk I participated in presented on a research paper on Test Driven Development. Specifically, I shared information about a project I did in MSN which was used as a case study in the paper. The gist of the paper and the talk is empirical evidence that doing TDD takes a more time that just hacking out code, but you gain a lot in terms of quality improvement. The main data points used to reach this conclusion was bug density (bugs/KLOC) on projects that used TDD compared with projects in the same organization that did not use TDD.
If you can, look within your organization at two projects: one where TDD was not practiced and one where it was practiced. Compare the bug densities. Share them if you are comfortable doing so. I would be surprised if there is not a minimum of a 15% drop (showing an increase in overall quality).
By they way, I do understand that bug density is not the best metric to use and that there are other metrics to look at. However, it is a common datapoint you can find on almost any project.