Software Quality

January 17, 2010

Code Contracts are a Great Tool to Enhance Quality and Testability of Legacy Code

Filed under: Code Contracts, Practices, Testing — Tags: , , — David Allen @ 11:48 am

The benefits of automated testing are well understood, and widely accepted as a good practice in software development in 2010. Unfortunately, in cases where we need automated testing the most, it is difficult to introduce. The best example is a large code base that is poorly constructed but important to our organization. Michael Feathers has written an excellent book Working Effectively with Legacy Code which describes the problem and how to tackle it in the real world. His book is a tremendous resource for people who wish to introduce automated testing to rotten code that lacks it.

In addition to the excellent ideas in that book, I believe code contracts can also help you achieve higher quality and greater testability. In this article I will explain how this is possible. (more…)

Blog at WordPress.com.