News for hackers. Stuff that matters.
Re:How deep are your unit tests? by TeMPOraL on Monday December 10, 2012 @08:54AM (#4898955)
It's partially an answer to jiggy2011's question from http://news.ycombinator.com/item?id=4898861, but I think it's worth mentioning separately.

There's a very good sentence in SO thread - j_random_hacker's: "Every programmer has a probability distribution of bug locations; the smart approach is to focus your energy on testing regions where you estimate the bug probability to be high."

So Kent Beck is not skipping some tests because he thinks he's awesome (as jiggy2011 said it sounds like); he does that because he can anticipate, from experience, that a particular type of bug is of very low probability for him, because he knows he's unlikely to make it. Like, for example, I tend not to put + instead of ++ in C++, so I can be pretty confident my code is free of these types of errors. Everyone needs to estimate his probability distribution for oneself (factoring for unknown unknowns) and test accordingly. The more experience one has, the better the estimate.

There are no comments on this comment yet.