In the course of a discussion over at the wonderful Hacker News site, I saw a hoary old canard raise its head, again. It did not dominate the discussion in any way, one of the things I like so much about Hacker News is that the discussions there tend to be very well balanced. The Ask YC and Ask HN threads are among my favorite reading on the internet.
The discussion was started by a question asking "Are You Religious?" The statement within this discussion to which I refer was part of a logic chain presented that ran something like this:
"Programming is a scientific discipline, therefore its practitioners think more scientifically than the common populace, therefore they have a greater likelihood of having a correct and enlightened outlook on X."
The X in question needn't concern us, particularly since it's so easy to kick apart the foundation of this line of argument.
Programming isn't science. It's not even scientific.
Programming is an art.
Programming is an applied art. Comparable to mechanical engineering. Both have connections with science, but neither is science. I've done both professionally, and of these two mechanical engineering has the closer ties to science, and requires far more rigor in the application of scientific processes. Programming, on the other hand, is much more at the "soft" end of the applied arts. Its connection to science is far looser, and much more akin to the connection between science and the fine arts, like painting.
One likely source of confusion is the college catalog term "Computer Science." Another is the common confusion of technology with science.
Computer science classes don't teach science, and the scientific method is absent in these classes. It's not there simply because it isn't used. Computer "science" classes are all about technique, as much as a class in ceramics or oil painting is about techniques in those arts, or a class in processes of materials is about techniques for producing desired items from raw materials. Technique is about the application of the products of science, but also a means of codifying and transferring practical experience.
I took computer science classes long enough ago that actually programming was not even a required part of the class. The focus of the classes was on determining the computability of problems, approaches for breaking problems down into computable pieces, and designing methods for incorporating computation into an overall problem solving process. We had plenty of material without spending any class time on computer languages. Yet this still was not science. The class was closely analogous to an introductory engineering class. It was about problem solving technique, not about science.
I have worked alongside actual scientists and done science in the course of my work. My electronic and mechanical engineering work, not my programming work. Programming is among the skills I have used to support this work, but that doesn't make it science any more than the writing, drawing and, yes, cartooning that I have used in support of such work. I have conducted scientific research in the course of my work--though I still don't hold myself out to be a scientist, the scientific work I have done was conducted with far narrower goals than the advancement of science. I only had to do enough research to answer some specific question or to bring a specific set of observations in line with existing theory. Once that was achieved, my research (and the support for it) came to an end. I haven't had to conduct research with the rigor necessary for peer-reviewed publication or the scrutiny contingent on a change in basic theory. Though I have worked alongside those who have, and contributed my work to theirs.
There are sciences associated with programming, to be sure. Information theory, mathematics, and so on provide programmers with theory to guide their practice just as materials science and physics provide theory to guide mechanical engineering. But that doesn't make engineers or programmers scientists.
The fact that programming is art, not science, does not take away from it in any way. There is a panache about science in our society that may make it seem to be so, but honestly society in general hasn't demonstrated much judgement in what is and isn't science. Technology is regularly mistaken for science. Technology is...technique, study of. Therefore art. Programming is a technical pursuit, a "practical art." Our society has been greatly enriched by its practical arts, there is no call to be ashamed of them if they are not science.
However, we should not look to the practitioners of these arts as being "more scientific" in their thoughts and outlooks than people of other disciplines. In fact, it is perfectly possible to be a scientist and still be as much a mere mortal in terms of personal philosophy as a non-scientist. Practitioners of practical arts are just as capable of being impractical outside their particular line of work as a masseuse, a hair colorist, or an astrologer. You can design a building that will stand while going home at night to work on proofs that the Earth is flat. You can write an efficient transaction processing system while in the middle of a years-long project seeking to write code to summon the spirits of dead people. You can give a good backrub then go home to practice telepathy on your pets.
Programmers are people. They regularly apply a range of problem solving techniques to their work. This does not impair their human capacity to adopt a wide range of philosophies and beliefs.
Programming is not a science. It does not require, or often use, scientific discipline and rigor. Its practice does not impart greater wisdom or intellectual incisiveness to its practitioners than any of many, many demanding disciplines.
Programming is an art. It is an art with magnificent application, and a medium that is accessible in a way that no other can approach, except perhaps pencil and paper. The works of that art are certainly reproducable in a way that works outside the digital medium are not. Confusing it with a science is not doing a favor to programming, and saying that programmers are elevated above some theoretical level of "the masses" in discernment isn't doing programmers any favor, either.
Programmers have every reason to be prooud, but for what they are, not what they aren't.