I worked on a large C++ project with design-by-contract pattern a long time ago. It was not the most pleasant experience. There was so much more code to validate pre and post conditions and class invariants. It might have had a lot to do because it was a classic OO business system (think a large Java app now, but where all the code was C++), but I remember spending more time writing the contract code than the actual business code.<p>Is there any recent writings on this pattern on applying the idea more sanely? As it is, I think I prefer to write testing code outside of the core behavior and have to anticipate what values are valid, or create new tests as bugs are found.