The Philosophy of Computer Science (2017)
A framework I have recently found useful for thinking about my work as a computer programmer is a classic set of philosophical concerns:<p>Truth, goodness, and beauty.<p>That is to say, software development has an intellectual dimension, a moral dimension, and an aesthetic dimension.<p>For me, the intellectual questions primarily concern program correctness.  Is this code bug-free?  Is it robust and stable?  I tend toward the &quot;computer science as mathematics&quot; epistemology of Dijkstra and Hoare.  Invariants; inductive reasoning; temporal logic.  At least at the level of individual functions, I find that it is feasible to express with rigor and clarity what the function is intended to do, and to reason with precision through to a conclusion that the implementation fulfills the intent.  And, there is a test for every line of code.  A favorite quote from Knuth:  &quot;Don&#x27;t trust the following code.  I have only proven it correct, I have not tested it!&quot;<p>The moral questions concern the uses for which the code is designed, and the uses to which it will be put.  I work on medical device embedded software these days, and the moral dimension of this work is a very meaningful and concrete benefit of this choice.  I used to work on software development tools to support avionics development for the B-2 bomber.  While I don&#x27;t dismiss the latter as unambiguously immoral, it certainly was more problematic for me, an ongoing source of angst and struggle.<p>The aesthetic issues seem to me to be two-fold:  how beautiful is the software from the standpoint of the user?  And, how beautiful is the source code?  I have seen (and written) much code that is frankly an ugly mess.  I have also upon occasion had an inspiration about how to re-write a piece of code.  Tons of code gets deleted, and the new code is simple, clean, elegant, and inevitable.  I would go so far as to claim that at times I have been graced to write code that turned out to be beautiful and aesthetically pleasing.  It seems to me that the &quot;Clean Code&quot; movement encourages creation of code that is elegant and beautiful.<p>I find that this triad of concerns inter-relate.  Beautiful code is more likely to be correct, and conversely.  Mindfully written code that is done with clarity and integrity tends to be both more beautiful and correct.