A Thing of Beauty

There’s an interesting article, A thing of beauty in the latest New Scientist. It has deep resonance with me as a programmer. It reminds me of a quote I once read.

Code should be written for humans to read, and only incidentally for computers to execute. Introduction to SICP

Sorry, I forget the attribution. Knuth maybe? But the point is that elegant code clearly expresses the ideas that you are thinking to other people who read that code. Often, the elegant solution to a problem will also be the naturally faster one as well. Unfortunately, that reminds me of another quote.

For every complex problem, there is a solution that is simple, neat,
and wrong. —H. L. Mencken

But that certainly shouldn’t stop you from trying to find a clean elegant solution. 🙂

Comments 2

  1. Dominic Mitchell wrote:

    Many thanks; corrected.

    Posted 03 Feb 2006 at 09:55
  2. Aristotle Pagaltzis wrote:

    Your first quotation is from the preface to the first edition of Structure and Interpretation of Computer Programs by Abelson, Sussman and Sussman.

    Posted 03 Feb 2006 at 10:05