My hackles were raised this week by Neil DeGrasse Tyson dismissing philosophy as useless. As a former philosophy student (feel free to go ahead and make the Simpsons' joke) I beg to differ.
There have been lots of excellent counters to Neil Tysons contention (like this one and this one) so I will confine myself to the importance of philosophy in computer science.
If you look at talks like Kevlin Henneys illuminating deconstruction of SOLID and Rod Johnsons amazing keynote on Scala, Java and Poetry you will find that they revolve around linguistics, logic and (wait for it) metaphysics. This should not be surprising. Ever since we stopped memorising opcodes in favour of compilers the questions we have asked are what philosophers would call ontological.
To give you the wikipedia definition:
ontology deals with questions concerning what entities exist or can be said to exist, and how such entities can be grouped, related within a hierarchy, and subdivided according to similarities and differences
Does this sound in any way familiar?
What developers try to do in a limited domain via ERD, OO, UML, DDD, FP etc… philosophers have been doing to the world since Plato. There are a few lessons to be learnt from several thousand years of sustained effort :-)
To try and make this a but more concrete let me give you some basic philosophical principles and relate them to good programming practise in general and OO in particular.
Utilitarianism
Jeremy Bentham and John Stuart Mill invented this branch of philosophy. Which postulates that it is the greatest happiness of the greatest number that is the measure of right and wrong. In Agile teams this means don’t be a ‘Prima Donna Developer’ who uses exotic libraries, bleeding edge tools, convoluted designs and esoteric hacks (often in the name of performance). Write code that can be easily read and maintained by the average developer in your organisation, and if that makes you unhappy then tough.
Existentialism
Both in the crucible of WWII existentialism is a tough, uncompromising philosophy that people gave their lives for. Jean Paul Satre famously believed that in choosing for himself [man] chooses for all men. In other words we are all free agents and create ourselves from the choices we make, so any choice (even when made in secret) must be based on the principle that this is what we would wish all others to do in the same circumstances. The Agile implication of this is that every time you choose not to write tests, not to write the tests first, not to refactor etc… you are letting down not just yourself but the whole team even if your teammates never find out. So no pressure :-)
Occam's Razor
This is an easy one. Often summarised as entities must not be multiplied beyond necessity this principle is embedded in our profession as DRY. Every time you normalise a database, extract duplicated code into a private method or agree with teammates on the text of a label you are following Occams Razor.
Empirical Falsification
Another easy one. Invented by Carl Popper this states (according to Wikipedia) that theory in the empirical sciences can never be proven, but it can be falsified, meaning that it can and should be scrutinised by decisive experiments. In software engineering this is what we call Test-Driven Development.
Linguistic Relativity
This is a tough but important one, because both our disciple and that of linguistics are currently beating themselves up over it. Linguistic Relativity is based around the (so called) Sapir–Whorf hypothesis, which postulates that the language you use determines the thoughts you can have and behaviours you can perform. To quote Wittgenstein “the limits of my language mean the limits of my world”.
In linguistics this is a deeply unpopular notion (but see this and this) whereas in computer science we embrace it with a passion. It is an article of faith amongst passionate developers that all languages but ‘X’ prevent the user from slicing the problem into the appropriate structures that will lead to full functionality and perfect performance. This is why we view the real world as made up of activities (‘C’), self contained entities (‘Java’) or independent processes (‘Erlang’). The most extreme example of this is probably the ‘all of JEE could be rewritten in 5 lines of Haskell’ camp within Functional Programming.
Of course if the mainstream linguists are correct and the Sapir–Whorf hypothesis is false then we should stop the past 30 years of tail-chasing and simply pick one language to rule them all. Uncle Bob did a talk about this some time back.
BTW if you are heavily into the Clojure ideas around identity, equality and efficient immutable data structures then you will have great sympathy for Derek Parfits work on personal identity.
Conclusion
If you made it this far then hopefully I have convinced you that philosophy isn’t a pointless redundant effort and actually has some relevance to our profession. Should you be interested in going further a great starting point is the famous Godel, Escher, Bach by Douglas Hofstadter. Any other ex-philosophers out there should feel free to correct my generalisations above. And please do get in touch – perhaps we can start a support group :-)
Kent Brockman: Scott, things aren’t as happy as they used to be down here at the Unemployment Office, joblessness is no longer just for philosophy majors… now at the risk of sounding unpopular, this reporter places the blame for all of this squarely on you [pointing at the camera] the viewers!