Wednesday, September 7, 2016

Why Philosophy Is Important To Programming

Spinoza
Baruch would like to discuss stretching the concepts of proof beyond mere math.

If your friends and family rolled their eyes at you when you announced that you were majoring in philosophy, I empathize with you. Perhaps it is better to say that there is a part of me that empathizes and there is a part of me that asks whether you are out of your damn Vulcan mind. That more skeptical voice wonders about the practical applications of said major and waxes on about how such questions matter in a world where a degree at a second tier university costs more than a house. Even if you get a free ride or happen to be the progeny of millionaires, is a philosophy major really the best way to honor the blood and sweat of your benefactors?

Don't expect me to answer that last question. Honestly, if you needed that from me then maybe you shouldn't be a philosopher after all. Also, I don't need a lecture on how the importance of philosophy does not rest on its practical applications alone. What I want to do now is answer the skeptical voice's first question of practicality, at least in part. I am sure that many, if not most, people associate philosophy with nothing but mountaintop navel gazing about the meaning of life. (Which somehow they don't regard as a practical devotion?) If the twentieth century has shown us anything, it is that philosophy has a closer relationship to math, science - and dare I say engineering - than we have previously been willing to admit. We have folks like Bertrand Russell and Ludwig Wittgenstein to thank for this. Despite their contributions to the foundations of technical disciplines, I think they are still considered esoteric for many who labor within those disciplines to make their daily dime. We can hope that the twenty first century will bring the philosophical mindset to the masses.

The importance of what these folks accomplished lays in discovering or inventing tools with which we can reason about concepts. The unification of mathematics with set theory and formal logic preceded an acceleration of discovery. One of the most important contributions to twentieth century math after that, Godel's Incompleteness Theorem, would not have been possible without it. We cannot find the limits of reason before we have developed some formal way of defining what reason is.

One may ask, what do we need of philosophy if math already has the necessary tools? Set theory began with the question of how to formally define what mathematical concepts are. The set of all "things", however, extends beyond mathematical things. It extends beyond computer science and engineering, but for my part I will turn to computer science. Once a program exceeds a certain level of complexity, we start to talk about design and architecture. We start to collate lower level sequences of instructions and bits of memory into abstract concepts such as routines, objects, subsystems and the like.

Every step along the way, we have to make decisions about the divisions between these entities. While those division may be driven by software's relationship to the real world, they are just as much driven by demands of maintainability, extensibility, and stability, among other things. No one can tell you what the right division of labor is within your program. Often, there are several right ways. More often, there are several ways which are each right for a different purpose and we have to decide which purposes are important and which can suffer compromise and exactly what are the tolerable compromises.

I am not aware of anything quite as well established as set theory and formal logic for reasoning about these things. Each program is a bit like developing a new set theory. We have to start at the beginning, asking the big questions of what it is we hope to accomplish and what is the best way of accomplishing that. While there may not be any tools for answering these questions as one might develop a theorem and its proofs, there are tools that can help us divide and conquer. These tools are found in philosophy. I was go so far as to say that we can adapt more than just metaphysics and all its descendants. Even fields such as ethics and aesthetics may be important in our endeavor.

Unfortunately, I feel that most software developers are left to their own devices. The good ones probably rediscover concepts that may have gleaned from Spinoza or for that matter the pre-Socratics. Is it so revolutionary to suggest that curriculum in computer science should include some survey of philosophy, so at least we can know where to look when we want to find someone who may have traveled down the same corridors of thought?