A scientific truth does not triumph by convincing its opponents and making them see the light, but rather because its opponents eventually die and a new generation grows up that is familiar with it.
-- physicist Maxwell Planck
Long ago in deepest history, some bright soul wondered why some buildings fall down and others don't. It was a practical question at a time when big buildings often fell. While the naive realist of the time simply accepts the fact that some buildings fall down, the eternally curious seeker wonders why things happen the way they do, and whether figuring things out may be helpful in some way.
Science is one way of figuring things out. As a child of naive realism, science starts from the assumption that things are generally what they seem, but that patterns connect them. The essence of science is that every time I stick my finger in a flame, it gets hot. The goal of science is to find such patterns and make them as precise as possible.
The most convincing evidence of science's genius is technology. Big buildings don't fall down as often as they did before science took a look at them. We now enjoy electric light bulbs, automobiles and flush toilets as well.
Although astronomy, chemistry, and biology advanced early in history, what is considered modern science was born in the 1600s with luminaries such as Galileo and Newton. They gave rise to what is called "the scientific method," which might be summed up like this:
The scientist should be objective, an outside observer not affecting the experiment.
Experiments should be repeatable. Given a specific set of initial conditions, the same result should occur every time.
Theories of natural laws should be consistent with all observed facts, and at the same time make predictions that can be proved true or false with future observations.
By the end of the 1800s, science reigned triumphant. Nearly everything in the entire universe was neatly explained, and the fruits of technology seemed boundless.
Science at this point supported naive realism in many respects: it still assumed solid objects bouncing around in an external space and time. Because the results of technology were physically obvious, naive realists accepted science as true, even if they didn't have a clue what it claimed.
However, classical science did break from naive realism in a major way. Science drew a line between "objective reality" and "subjective perception." Suddenly, the sky wasn't blue; the sky had no color -- color arose as the result of the interaction between the sun, the sky, and the human eye.
To go further in this direction, let's assume I am looking at a purple flower. To the scientist, what happens is that light leaves the sun and hits the flower, which absorbs some of the light and reflects some of the light. Some of the reflected light -- just a tiny bit -- hits the human eye, which ignores nearly all of it, focusing on a tiny portion which we call "visible light." It then ignores most of this, concentrating only on the portion of visible light which is (in some sense) strongest, and this (by some mysterious process science ignores) produces the sensation of "purple." Other creatures see different colors; for example, an insect might look at the same flower and see a bullseye pattern of shades of ultraviolet. The flower itself is neither purple, nor ultraviolet, nor any other color. The color arises from the interaction of light, the flower, and the eye, and does not exist without all three.
Science therefore gave birth to a sort of sophisticated realism, where human beings do not perceive things as they truly are, but rather perceptions arise as a result of the interaction of the human and its environment. Perception does not show the object as it truly is, but in the way it interacts with human senses.
It is questionable how many people ever advance beyond naive realism to this sophisticated realism. Someone may look at a computer screen, believe it is real because they see it, believe that science is true because it produced the computer, and at the same time ignore the idea that there are no colors on the screen.
By the end of the 1800s, the sophisticated realist could sit comfortably, knowing that science had neatly explained nearly everything in the universe, even if it did dispel the illusion of reality being what it appears to be.
However, the newly discovered science of electricity clashed mightily with classical physics; in fact, it flat out contradicted it. There was no way both classical physics -- which had proven so successful with physical machines -- and electrical physics -- which had also been successful -- could both be true.
The result, the birth of modern physics, would completely destroy all assumptions of reality, inadvertently knocking the feet out from science itself.