Breaking the Rules
In the early 1900s, a mathematician named Gottlob Frege was putting the finishing touches on Volume 2 of his Basic Laws of Arithmetic. He had spent years writing his definitive work on set theory, the part of mathematics that deals with memberships.
Frege had painstakingly compiled impressive results based on the simple notion that any item was either a member of a set or it was not. For instanceThe number 2 is a member of the set of counting numbers (1, 2, 3, 4 …).
The color purple is not a member of the set of colors typically found on a traffic light (red, yellow, green).
On June 16, 1902, while Frege's book was at the printers, he received a short note from a fellow named Bertrand Russell. The note said something like this:Suppose there is a village in which every man must be clean shaven. There is a male barber living in the village who shaves those men, and only those men, who do not shave themselves. Who shaves the barber?
Frege stared at the note with mounting horror. If the village barber shaved himself, then he would be shaving someone who shaved himself, which contradicted the rule. If the barber did not shave himself, then there was someone in the village who did not shave himself and was not shaved by the barber, which also violated the rule. In short, Russell's simple note brought Frege's work crashing down around him.
Frege eventually wrote a preface to his work which, very roughly translated, goes something like this: "I could wish that this issue had been brought up sooner, but…what the hell…I might as well publish."
So, here's the personality test: Who do you feel sympathy for in this story? Do you admire Frege for his industrious nature, or do you admire Russell for his insight and the elegance of his example?
I must admit that I am firmly on the Russell side in this story, and that makes me a breaker. There are an infinite number of cases for which Frege's system worked, but Russell penetrated to the heart of the issue and found the case where the system fell apart. I can appreciate that it might have been nice to tell Frege about this problem a few years earlier, but I can't argue about the elegance with which Russell exposed and exploited the weak point in Frege's system.
This "counterexample" approach is a good way to think about software testing. Testers are too often seen as blindly banging away at keyboards, but keyboard banging only finds the most superficial faults. Good testers have a deep understanding of the system and its limitations, and they look for ways to exploit those limitations. They don't care about the infinite number of inputs that work well. In the finite amount of time before shipping, they want to find those inputs that make the software not work.
The topic of software testing runs very deep, but under it all, there is a thrill of the hunt for the perfect counterexample, the one input that brings everything crashing down. And good testers even have an aesthetic for the qualities of a good counterexample: short, sweet, devastating.