Contemplating Beautiful Code...
Honestly, I thought I had written this a year ago.
I received a review copy of the O'Reilly book Beautiful Code over a year ago, and I was hopeful from the time I heard about it. For any technical subject I knew, the go-to book was always the O'Reilly. I learned C++ from O'Reilly. I learned lex and yacc from O'Reilly. I learned Perl from a book with a Camel on the front. Later, when Linux and Open Source started to get a foothold in the mainstream computer world, O'Reilly published an excellent oral history with Open Sources. When I saw O'Reilly and Beautiful Code together, I thought it would be an excellent resource.
And then I started to read.
I just couldn't finish.
There are many words in the jargon file that can lean toward implying beauty. Elegant, for example, or clean. "Clever" is used but has no entry. Many more describing variations on ugly, but this is understandable. "Readable" isn't in the Jargon File but is a common complaint against Perl, my language of choice.
Absence of complication leads to elegance, but is elegance beauty? Is cleverness beauty? If code is readable, is makes it easier to understand, easy to change, but does that mean beauty? The Keats test, "Beauty is truth, truth beauty,—that is all Ye know on earth, and all ye need to know", seems insufficient. And nothing I read made a utilitarian or functional argument for the benefit of beauty in a code base.
I was disappointed in O'Reilly for this. They're still my go-to supplier for technical books. As I write this, I'm waiting with bated breath for Amazon to deliver The Productive Programmer. It should arrive today. Productivity, that's something measurable, something I understand the value of. I hope it's more ueseful than Beautiful Code.