July 26, 2005

Confusion of Codes

by Nick Montfort · , 11:59 am

Acting on a tip from Stephanie Strickland, I’ve been reading Florian Cramer’s Words Made Flesh: Code, Culture, Imagination, a PDF book that is an impressively broad compendium of creative uses of code, stretching back deep into pre-computer times. It’s well worth checking out for those interested in the history of computational art.

Near the beginning, though, Cramer repeats a confusion that I’ve seen hinted at elsewhere. Although it doesn’t end up being important to the book, this point confuses clarity with obscurity and secrecy, so I thought I’d take the excuse to pick this nit before the infestation becomes more widespread:

As speculative codes, Egyptian hieroglyphs (in their two different historical readings), the Voynich Manuscript and Travis Dane’s CD-ROM render “code” ambiguous between its traditional meaning of a cryptographic code, i.e. a rule for transforming symbols into other symbols, and code in its computational meaning of a transformation rule for symbols into action. Ever since computer programmers referred to written algorithmic machine instructions as “code” and programming as “coding,” “code” not only refers to cryptographic codes, but to what makes up software … (p. 9)

Here, Cramer is overlooking a more obvious and relevant pre-computer meaning of “code,” one which seems much more related to the code of computer program than is the cryptographic meaning of the term. Cramer provides no argument here or elsewhere as to why the programming sense of “code” would derive from or otherwise relate to the early sense of “code” as a secret cipher. The way programmers use “code” is much more obviously connected to formal encoding or transformation for purposes of unambiguous representation or communication. Morse code and Baudot code are examples such non-secret codes formalized to improve communication; they seem very directly related to ASCII and the BCD (Binary Coded Decimal) scheme used in computing. If someone encodes text in Morse code, it’s not to keep it secret from me – although I don’t know Morse code, so it might incidentally help in that regard – but rather, to make the message completely clear to all radio operators. Similarly, I encode an audio waveform in order to make a clear and compact digital representation of it – if I want to encrypt it or add some fancy Digital Rights Removal technologies, that’s a separate process, one is that also formal, but is different in purpose and effect and that happens after encoding.

That video, audio, and text can all be encoded without being encrypted is one thing that suggests encryption isn’t the main pre-computing sense of “code” that has been brought into digital practice. It seems clear to me that the “code” of a computer program also doesn’t have much to do with secret codes, however obscure and esoteric some computer programs may be. Such “code” just formally represents instructions. It is written not to keep anything secret, but to make sure these formal instructions are completely clear to the computer.

3 Responses to “Confusion of Codes”


  1. music is math » Blog Archive » ebook on code in history Says:

    […] nada: new album!

    ebook on code in history

    Found this on: http://grandtextauto.org/2005/07/26/confusion-of-codes/ it’s an ebook […]

  2. Zach Whalen Says:

    I guess I had long thought that there were simply two unrelated definitions of “code” : 1 – “A system of rules (as in Building Code, Code of Hammurabi”), 2 – “Cipher”. It’s interesting to see the etymology of this word (yes, I went to the OED) and to see that the relationship demonstrates that the first definition really is more closely linked to its use as “computer code”.

    Briefly, the progression looks something like this:

    code.1 = a set of Rules
    code.2 = a set of rules for communicating information in a military context (e.g. Morse)
    code.3 = the specific dots and dashes that make up the encoded messages.
    code.4 = stuff you put into a computer to make it do stuff

    This is kind of off the cuff, but it seems that the crucial shift occurs between 2 and 3 where the word goes from referring to the rules governing a system, to the system itself, to the “governed” part of the system. As a sidenote, let’s not forget “codex”, which also started as “a set of rules”, but came to refer to the book containing that set of rules, etc.

    I suppose that what’s important here is the sense in which both/all definitions of code also define a community by excluding those not in the know, which is perhaps why the “computer user as cryptanalyst” model is so seductive. Also, I don’t usually make much of puns, but “cybertext” has a nice rhyme with “ciphertext”, which is obviously intentional.

    This assumption of mine, and apparently, Kramer’s, that computer code is related more closely to cryptography than rules-systems, seems to have its problems. For example, I had always thought that calling HTML “code” was simply a misnomer, because HTML is a straightforward markup language and writing html doesn’t involve “encoding” or any other obfuscation. I suppose, however, that something like Perl is also a set of rules that dictates a way for me to make something happen with 1’s and 0’s without having to actually encode myself. So Perl as code is also more like the “rules” definition.

    Anyway, I’m rambling now, so I’ll stop. Thanks for letting me work through a couple of thoughts that are probably obvious. Thanks also, Nick, for the heads-up on the Kramer book.

  3. nick Says:

    Thanks for the comment, Zack.

    I noticed that WordNet gives three senses of the noun “code,” and the second one lumps brevity and secrecy together (not mentioning clarity).

    1. (9) code, codification — (a set of rules or principles or laws (especially written ones))
    2. (1) code — (a coding system used for transmitting messages requiring brevity or secrecy)
    3. code, computer code — ((computer science) the symbolic arrangement of data or instructions in a computer program or the set of such instructions)

    But the two senses of the verb “code” are more clear in showing the split between formal representation and such representation for purposes of encipherment:

    1. (1) code — (attach a code to; “Code the pieces with numbers so that you can identify them later”)
    2. encode, code, encipher, cipher, cypher, encrypt, inscribe, write in code — (convert ordinary language into code; “We should encode the message for security reasons”)

    Encrypted messages do have some things in common with ones that are encoded (e.g., in Morse code or ASCII) but not encrypted – they’re both formal representations, very suitable for manipulation by computers. And, of course, do you have to know the representation to decode and understand them. But that still seems to leave a big gulf between codes (encodings) created to foster universal, open communication and those codes (ciphers) created to explicitly obscure messages during transmission.

    I suppose that what’s important here is the sense in which both/all definitions of code also define a community by excluding those not in the know

    Yes, although I think that’s true of any communication system, even if it isn’t formal. If we were to speak to each other in Latin somewhere where the people around us didn’t know Latin, that could serve the exclusive/secrecy purpose, even though Latin wasn’t developed as a cipher, and can’t be one in the formal sense, as isn’t a formal system.

    What seems most interesting to me is the move from hooking up patch cables and wiring together logic gates to the stored program, a sequence of numbers, and then to a more human-readable form in assembly language, and then up the software hierarchy through programming languages and user interfaces. (This topic is taken up Maurice Black in chapter 2 of The Art of Code.) This “invention of code” and the progression to higher-levels ways of coding resulted in people having to do less memorization of the specifics of machine capabilities and remembering of esoteric codes. What would once have been accomplished with patch cables or binary digits can now be accomplished quickly with some “scripting” language that even runs in the same way on different computer platforms.

    Well, that reminds me, I’d better get back to my coding…

Powered by WordPress