[SATLUG] San Antonio's Daily WTF
justizin at siggraph.org
Wed Dec 6 12:42:18 CST 2006
On 12/6/06, Bob Tracy <rct at gherkin.frus.com> wrote:
> Travis H. wrote:
> > Bruce Schneier says that "turning of assertions in production code
> > is equivalent to unbuckling your seat belts when you finish Driver's
> > Ed" (paraphrased). I think that's going a bit far.
I agree with two points here:
(a) What Bruce Schneier says
(b) This is going a bit far
In the unit tests for Plone, there are thousands of assertions made
testing what is *approaching* all interactions between various
modules, though I think really we have only passed about 50% coverage
a few months ago, we are also killing a bunch of untested code in
I don't want all that code running when people are interacting with
the site - we have exception handling to handle problems in real-time,
thank you very much. I have, however, considered that I might
enacting some automated running of unit tests on the live systems.
I may consider in some cases where a write is performed leaving
assertions in - there is nothing worse than finding out way too late
that your save code is fucked. ;)
> > But what an assertion _should_ be used for is detecting an internal
> > inconsistency that the developer thought shouldn't happen. In cases
> > like that, the program has strayed into a really weird area, and it
> > would be pointless to hope for it to correct the error, since the
> > developer thought this state should never be reached.
> One of the best of such things I personally witnessed was the one-liner
> on the console of a PDP-11/70:
> "Shut 'er down, Slim! She's pumpin' mud..."
> Memory gets fuzzy at this point, but I think the message was buried
> deep in file system driver code.
My favorite, from Zope:
I should write a patch to handle that case better, in fact. It's not too late!
Justizin, Independent Interactivity Architect
ACM SIGGRAPH SysMgr, Reporter
More information about the SATLUG