Well, I said I would wrap up the Poetry Corner stuff today and that it would be something different — so today I give you the question: Can computer code be poetry?
The question is spurred by an article I read that had been passed along on Facebook by LD: “The Poetics of Coding” by Matt Ward.
The article had a particular interest to me in that it was related to a thought I have often had, myself: that doing mathematics was very similar to writing poetry–and by “doing mathematics” I mean that which is often called proving stuff. Even this morning, as I taught Boy #1 about irrational numbers, he asked a question (“You know that square root isn’t a whole number but how do you know it isn’t a rational number?”) that launched me into one of the most elegant little proofs of mathematics: the proof that the square root of 2 is an irrational number. For the record, we actually did not do the entire proof together; I simply outlined the fundamental argument and used it to introduce the idea of proof by contradiction.
Done well, that proof is poetry. And I don’t mean that in a sentimental sort of sense; I mean it much more literally. (How literally–87%, 92%, or 100%–I will leave as an exercise for the reader.) In Jerry P. King’s marvelous and highly-recommended-by-me-for-everyone book The Art of Mathematics he discusses the two measures by which he believes the aesthetic (beauty-related) appeal of a mathematical result or proof can be judged: minimal completeness and maximal applicability. (This is a horrible summary, of course. Get the book!) In these I see echos of Mr. Ward’s discussion of code as poetry.
(Side note: in looking up the link for The Art of Mathematics, above, I have discovered to my giddy delight that Dr. King wrote a new book last year, Mathematics in 10 Lessons: The Grand Tour. One comment in that product review is worth stating here as it has relevance for the topic: Dr. King stressed in the book that “[A]esthetic considerations provide both the motivation for mathematics research and the standards for evaluating that research.” It is a statement that echos famed mathematician G. H. Hardy’s comment that “Beauty is the first test: there is no place in the world for ugly mathematics.” Of course, the four color map theorem hadn’t been proven in his day, but that’s another story. Where was I? Oh yeah–poetry and computer code! Let’s get back to that, shall we?)
In his article, Mike Ward takes one of the slogans of the WordPress team, “Code is Poetry,” and actually takes the time to explore that thought, beginning with superficial similarities and progressing to the not-so-obvious. It’s not the same as a discussion of why good mathematics is poetry, but he hits upon very similar points. I’ve done a lot of computer coding in my time, and the process of writing good code (note: not just code), regardless of the language, has a great deal in common with doing mathematics well, and, I believe, with writing good poetry. I think Mr. Ward makes a good case for equating programmer with poet.
I offer it as a cap stone to this not-planned-but-it-sorta-happened-anyway Poetry Corner theme we’ve had here the last few days: Is it possible that coding is, in fact, equivalent to writing poetry? It might be a bit of an esoteric read for some, but check it out and decide for yourself.