Debugging the minefield

When building any significant software system (by which, let's face it, we mean something greater in complexity than "Hello world\n") we are going to end up with bugs lurking in the system, in the same way that landmines lurked beneath the soil of freshly-ploughed fields in the Fulda gap in the mid-80s. Perhaps comparing the methods of clearing these lurkers might make their merits and demerits plainer.

Crawl and bayonet
Highly-trained engineers push their noses through the mud, probing gently with a long sharp bayonet to feel for the edge of mines beneath the surface. Generally effective at clearing a sufficiently wide path through the field for the following troops, but won't even try to remove all the mines; anyone who steps out of the marked path deserves all they get. (Dedicated testers and bug hunters. Expensive, but reasonably reliable within limits)
Mine detector
Cheap but effective kit that identifies any ferrous material within a few feet of the sensor and allows the user to mark off the area for later leisurely detonation. Only really useful for very sparse minefields if you're in any sort of hurry. Completely ineffective and induces a false sense of security for e.g. plastic mines. (Lint)
Flail / line charge
Specialised engineering kit either smashes a path through the mines with rotating chains, or fires a long tube of explosive which then detonates and explodes the mines underneath. Hopefully. Usually good at getting 90%+ of mines, but bad luck for the unlucky trooper who then walks over one of the 10%. Also only effective if the mines are the targetted pressure-sensitive kind. Fast and relatively cheap, at least once you've bought the machine. Not too much skilled labour required. (Debugging tools such as buffer overflow detectors, lint, Purify)
Drive a large flock of sheep over the minefield. "Baaaah" FOOM! "Baaaaah" FOOM! Like a flail, but less specialised and a lot cheaper. Morally dubious. (Beta-testing)
Infantry charge
Fix bayonets and run over the minefield at speed. You may or may not choose to tell them about the minefield beforehand. Very quick, but prone to erode your squad considerably. Also worth noting that the remaining squad are likely to want to hunt you down. (Release 1.0)
Go around
If you know the minefield is there, why go through it? Of course, the alternate route may take you quite a lot longer - and who knows, your enemy may have an ambush party placed along it. Or another minefield. (Green-field redevelopment)
What minefield? No-one's going to have sown a minefield in my path. (I'm sure we've all known developers like this.)
Precision targeting
DARPA-funded smart sensor/weapon technology that does a wide-band sensor scan of the area, characterises mines and fires precision munitions through the middle of each one. Comprehensive, destructive and not too long to run, but potentially ruinously expensive to develop, and generally only works in one or two types of soil. (Formal methods, proof of absence of run-time errors)

1 comment:

  1. I wish I understood this better. But software and me are like mines and clown shoes.

    Marshall once showed Stalin the US M4 Sherman flail mine clearance tank. "How do you guys deal with mines?"

    " We march the infantry over them," replied a slightly bemused Russian.


All comments are subject to retrospective moderation. I will only reject spam, gratuitous abuse, and wilful stupidity.