While reading Looking at Philosophy[1], I came across the section about Logical Positivists[2] whom I immediately recognized as "test infected"[3]! The Logical Positivists (circa 1910s-1930s) promoted the idea British philosopher, A. J. Ayer, named "the principle of verification"[8][9] i.e. "the meaning of a proposition is its method of verification". In other words, a statement is meaningless if it can't be objectively tested. This is the same big idea of Test Driven Development[5] and more specifically Test Driven Specifications[6] (aka Test Driven Requirements[7]); namely, don't create a requirement (or interface definition) that is so vague, subjective, or contradictory that an automated computer program can't be written to test for compliance.
In other words, all that verbage[12] that usually passes for a specification/requirements document is really just commentary to the REAL specification which is encoded in a comprehensive compliance test suite. [BTW, this isn't just a software concept since IC chips have long had not only "testbed" circuit boards to test chips, but also ICE (in circuit emulators) to test circuit boards via simulated chips (which software copied with "mock objects").]
The goal of both Logical Positivists and test-driven engineers is to weed out statements that are so poorly conceived and worded as to be effectively meaningless. The way to ensure this is to submit each statement to this rigorous method and rework any statements that come up short.
What did Logical Positivists have to say about "how" to do tests?
My whole excitement about finding philosophy movements that parallel aspects of software engineering is the notion that "top men"[11] have already thought and argued long & hard about this stuff, and therefore we programmers can benefit from what they've already learned the hard way. So, what method did they advocate? Basically, it is the idea that all statements should be broken down into "protocol sentences" plus logical conclusions built on top of them. Protocol Sentences were to be simply observation reports (based on first hand direct sensory experience). This was ultimately unworkable for humans, but everything in a computer test is based on its first hand direct sensory experience (of electrical signals anyway).
Karl Popper, among the most influential philosophers of science of the 20th century, said that claims could only be considered "scientific" if they were falsifiable, meaning that there should be some observation or experiment specified that, if it were verified, would prove the claim false.
Logical Positivists claimed that unverifiable statements were LITERALLY meaningless, and therefore they dismissed entire disciplines like metaphysics, morality, and ethics. Other, more moderate philosophers held that untestable propositions were merely unproductive to work with. Popper claimed that his demand for falsifiability was not meant as a theory of meaning, but rather as a methodological norm for the sciences.
Uh oh, Logical Positivism was considered a failure...Will Test Driven be too?!
I was all happy about a philosophical foundation to being test driven (since I was test infected years ago), until I got to the part where Logical Positivism has been so devalued by other philosophers that one wrote "Logical positivism is one of the very few philosophical positions which can be easily shown to be dead wrong, and that is its principle claim to fame."[10] OUCH!
By saying that so-called metaphysical claims were meaningless, they unwittingly said that the very claim "metaphysical claims are meaningless" was itself meaningless! I.E. there was no way to prove the statement that "only provable statements had meaning".
Lessons for the Test Driven Approach
Luckily, Logical Positivism was only an extreme position in the spectrum of ideas under the Verificationism[4] umbrella. In the conclusion of "Verificationism: Its History and Prospects"[8], some points were noted...
- one can't reduce every statement to be a logically equivalent statement about sensory experiences. (i.e. not every thought comes under the umbrella of "natural science")
- one can say that "a statement lacks legitimacy or objectivity if there would be no evidence for or against it; if it is insulated from reason, where reason is linked to the possibility of public evidence for or against the statement from other, already established statements"
- one must admit that some more abstract statements are understandable even if not testable.
So, the bottom line seems to be that the Test Driven approach is a good one if you...
- concentrate on testing what can be tested,
- create tests that would actively prove statements to be false, and
- know that you probably can't prove (with tests) that the test driven approach itself is correct.
[1] Looking at Philosophy, Donald Palmer, 4th Ed. 2005
[2] ibid, pg 327
[6] Acceptance Tests and the Test Driven Specification
[7] Test Driven Development or Test Driven Requirements?
[8] Verificationism: Its History and Prospects, C. J. Misak, 1995
[9] Language, Truth and Logic, Alfred Jules Ayer, 1952
[10] Prolegomena to Philosophy, Jon Wheatley, 1970
[11] "top men", Raiders of the Lost Arc
[12] verbage vs verbiage