Proponents of stronger computer science and programming courses in schools generally focus on the usefulness of those skills in today’s world. Some argue that computer programming should be offered instead of a foreign language requirement, while others say it’s crucial to engineering and robotics. Rarely is coding considered a complement to the English curriculum. But what if learning to code could also make students better writers?
There are more similarities between coding and prose than meet the eye. “The interesting thing about writing code is you don’t really write code for the machine,” said Vikram Chandra, a professor of creative writing at UC Berkeley and author of "Geek Sublime," on KQED's Forum. “That’s almost an incidental byproduct. Who you really write code for is all the programmers in the future who will try to fix it, extend it and debug it.
A famous programmer, Donald Knuth, championed the idea of “literate programming,” the idea that code should be written for humans, not just machines. Knuth compared the programmer with an essayist, Chandra said, paraphrasing his argument. “Somebody who sits down with a thesaurus and tries to construct a script that is best for human understanding, not for computer understanding.”
And code, like powerful literature, can have a long shelf life. If it is well written, it can be built upon many times over. And poorly written code could still be the cornerstone of an important software program that no one understands. To Chandra, truly elegant code solves a problem simply and within the aesthetics of functionality. And therein lies the difference between code and an art form like writing.
“Making something beautiful is not the same thing as being an artist,” Chandra said. “There is a substantial difference in what you are trying to do with the beauty.”