Yarrow and the Aesthetics of Computation

Several days ago I came across an interesting Wikipedia article about the Yarrow algorithm. Its purpose is to generate cryptographically secure pseudorandom numbers. CPRNG algorithms are interesting in their own right, and the unusual name "yarrow" further enhances the mystique of the algorithm in question. As I continued to read more about the algorithm, I gained the impression that it was something poetic, almost magical. Bruce Schneier, one of the algorithm's creators, has this to say about it:

Yarrow is a plant: a flowering perennial with distinctive flat flowerheads and lacy leaves. Yarrow stalks have been used for divination in China since the Hsia dynasty, in the second millenium B.C. The fortuneteller would divide a set of 50 stalks into piles, then repeatedly use modulo arithmetic to generate two random bits. Yarrow stalks are still used for fortunetelling in China, but with a greatly simplified method: shake a container of 100 numbered yarrow stalks until one stalk comes out.

As I continued to read about how the algorithm uses "entropy pools" and performs "reseeding", my fascination continued to grow. I have a list of interesting names that I'd like to use for future programming projects: things like "lace", "porcelain", "verdigris"--you get the idea. Yarrow was a perfect example of the aesthetic appeal that I wanted my own projects to have. I combed through my list of project ideas to find something that I could make like this.

But as I thought about it more, the name "yarrow", and all the other vocabulary associated therewith, is nothing more than a decoration. It's superficial. The actual substance of the algorithm is roughly the same as any other CPRNG, and it could have easily been given a banal name like "numbergen" and that would have sufficed. In fact, yarrow has been superseded by other, more secure CPRNGs, and those CPRNGs will be rendered obsolete by even better algorithms in the future. The name is incidental and doesn't relate to any sorcery or glamour inside the algorithm; there's only number theory.

To be fair, it's not the fault of the people who made Yarrow that I got so excited and then so disillusioned. All they did was give it an interesting name. Ultimately, this blog post is more about my interpretation of the name than anything else.

I wonder if an algorithm or a piece of software can have aesthetic value not from of its name or because of what it does, but by virtue of what it is--just as a painting, a song, a movie, or a poem has an immediate aesthetic value. The question of what to program has plagued me for a long time (see previous blog posts). There are many things that inspire me, but translating that inspiration into any kind of software has resulted in disappointment. Software, I believe, is ultimately a tool rather than its own art form. At best, it's a new medium. Perhaps it's time to shift my focus towards a more direct form of art, like writing or drawing. On the other hand, it might be that programming really is an art form unto itself. But I haven't seen convincing evidence of this yet. Even my favorite digital artist, Devine Lu Linvega, creates things that are ultimately audiovisual in nature. The code is invisible, and as Linvega himself points out, it is also ephemeral.

One of the tools I designed this year was an image gallery that let you tag images and then browse the collection using those tags. I use it to organize and search my art gallery, which is a big collection of random things that I find inspiring or appealing: pictures of bonsai, medicine labels, excerpts of poetry, paintings by various artists, etc. It should tell me something that I have a collection of visual art but no analogous collection of software.

My hope is that this realization about Yarrow will serve to correct my course, and maybe someday I will create something worthwhile.