Is Coding Writing?
Everywhere you turn these past few years, young (and not-so-young) people are being encouraged to “learn to code’. Is this helpful? If so, what is the aim? To raise a generation of people who can tell a computer what to do? If the AI folks are at all successful, those same computers will be telling us what to do. In fact, and in many fields, they already are. Perhaps it’s not as directives, but as “expert guidance”. But that output is intimately influenced by the input – the people doing the coding.
And therein lies a problem. The old programmers’ expression – GIGO – applies to assumptions built into the code as much as to the data which those programs manipulate. Even the language chosen will radically influence not only how things are written, but what can be written. Rob Sawyer wrote recently about the Sapir-Whorf Hypothesis on Patreon https://www.patreon.com/robertjsawyer/posts. Here’s the relevant passage: “…the Sapir-Whorf Hypothesis, which says that the language one is speaking constrains and shapes how one thinks.” I’m sure there is an equivalent Hypothesis relating to computer languages. If there isn’t there should be.
I have used Assembler, FORTRAN, COBOL, Java, Ruby, Visual Basic, Python, and probably others in my IT career. Things that are difficult in one language (hundreds of code lines in Java) can be almost trivial in another (a dozen or so code lines in Python). In natural languages, the same applies. “Schadenfreude” is a concept in a single word that takes a paragraph to loosely represent in English, for example.
Rob gave an interesting example in another recent post, a rebroadcast of a CBC Ideas episode from 1985. He’s talking about how Science Fiction authors and readers look at the world differently than do others. His example is the phrase “Her world exploded.” In a Romance novel, for example, it would imply that the character’s personal relationships world had fallen apart. In an SF novel, it would simply indicate that her home planet was no more.
If we look at the world so differently based on experience and assumptions, even using the same language, how much worse is the problem with differing languages?
Getting back to Is Coding Writing… the problems are hugely worse. Computer languages are carefully constructed, with rigid rules. There is no natural human language in which this is the case. Even planned languages such as Esperanto have exceptions and special cases. I can’t speak for LogLan, I know nothing about it. But it was created by humans for other humans, so it will inevitably contain inconsistencies. Computer languages, on the other hand, must not contain logical inconsistencies. Computers do not (as yet) have the ability to parse intent and nuance (although there is a whole subset of AI research in the area of “intent analysis”). And even with all of human cultural experience, we still get it wrong. If we didn’t, sitcoms wouldn’t exist.
The answer to my initial question is, at least so far, “probably not”. Is there room for creativity in structuring a program? Yes, there certainly is! Will two individuals, each skilled in that language, interpret its process and result the same way? Yes, they certainly will. That is not true with natural languages. So no, coding is not writing in the overall sense.