From: Hugh Sasse Date: 2006-10-13T00:41:12+09:00 Subject: Re: Debugging in the large, modern practice? On Thu, 12 Oct 2006, Eivind Eklund wrote: > Invariant checks ("Design by Contract"), mostly. Adding invariant > checks to your system will often unearth weird cases - making them > easily reproducable and making them fail early. Yes, this is something I need to know more about. In Programming Pearls I've seen lots of mention of invariants, e.g. for loops, but though I think I understood what was being said, I found that I didn't 'grok' the statements deeply. I think I need to understand more about how to think in this way. Some of this is probably covered by "What could I put in an assert statement that would always succeed (for this loop or whatever", but I suspect the concept runs deeper. > > Testing (which has already been mentioned) can handle some of the same > niche, by removing coupling and allowing you to externally check for > invariants being kept. However, it is usually much easier to add > invariant checks to a system than to add tests. > > Eivind. > > Thank you, Hugh