Darwin said, "You cannot observe without a theory."
I don't think this means we're supposed to run out and get a theory. Rather, it means we already have one, and we should be explicit about it, and think about how it limits our observations. If our observation theory is stupid or inconsistent, conclusions we base our observations will probably be incoherent and contradictory.
Eddington's example is that if we search the oceans with a net that has a one-inch mesh, we cannot conclude anything about the properties or existence of fish less than an inch long.
I want a theory of software bugs, that explains what happens in the instant when a bug is introduced into a program. Then I will be able to observe bugs in a way that guides me to avoid later bugs.
Some papers on program complexity metrics seem to have an implicit theory something like "Bugs are like alpha particle decay: they happen uniformly to all lines of code, all programs, all programmers," at least for a large sample. Using this theory, they reason that the larger a program is, the more bugs it will have. Subtler versions of this theory suggest that this size should be measured in function points, paths, or basic blocks.
What I observe is that some programs have lots of bugs and some don't have many, not correlated with their size, however measured. Other factors, like who worked on the code, what tools and methods were used to create it, and how well the requirements for the module are understood, are much better predictors of future bugs.
I had a heck of a time tracking down Darwin's quote. The best reference I have is, "Darwin said no one could observe without a theory; I suppose he was right; 'tis a fine point of metaphysic; but I will take my oath, no man can write without one..." Robert Louis Stevenson, letter to Henry James, Vailima, Apia, Samoa, December 29th, 1890. He doesn't say where he found it: possibly it was in Darwin's letter to Henry Fawcett, where he says, "How odd it is that anyone should not see that all observation must be for or against some view if it is to be of any service!" Eddington's fish are in The Philosophy of Physical Science.
Copyright (c) 2005 by Tom Van Vleck