Random Art and the Law of Rotten Software
- 17 August 2010
Since the death of my old web server my Random Art has not worked. Bringing it up to date and installing it on the new server was a nightmare in software management. But it was worth it. The new Random Art runs the random art program inside your browser!
I implemented the old Random Art in 2005 withÂ ocaml and cduce. Cduce is a programming language for XML which statically checks correctness of produced XML. I thought that nothing could be better than a web site that has an a priori guarantee of 100% complicance with strict HMTL. Those were the days of idealism.
Well, in 2010 it turned out to be quite impossible to reinstall Random Art on the new server. First of all, the current version of cduce is incompatible with the one from 2005. In addition, the old version of random art relies on old ocaml libraries that are not available in current Linux distributions, so I cannot easily recompile it. If I really wanted to install the old version, I would have to install an antique Debian system from 2005, but then I would suffer from old security holes. There must be a software equivalent of theÂ second law of thermodynamics, let's call it the Law of Rotting Software:
“All software eventually fails, even if it you leave it alone.”
So it was clear that I should junk cduce and use something sane, like Django. (I know there is ocsigen, but as we say in Slovene, even a donkey steps on thin ice only once). I separated the ocaml code that computes random pictures from cduce and reimplemented the web site in Django. The site was up and running in no time!Â Except that all pictures were uniformly gray. It took me a week to figure out that this was caused by a change between ocaml 3.10 and 3.11 in how they treat mutable record fields inside function closures. It is still not clear to me exactly what the change is because I am not able to produce a small example that shows the difference.
f(x,y) from left to right). I am amazed at having 1200 lines of ocaml code run inside a browser.
Very interesting! Do you plan to publish the source code, at least the OCaml/ocamljs part?
From The Tao of Programming, Book 5:
A well-used door needs no oil on its hinges. A swift-flowing stream does not grow stagnant. Neither sound nor thoughts can travel through a vacuum. Software rots if not used.
These are great mysteries.
Andrej, I feel your pain! I embarked on the futile project of making a G3 Power Mac my web server, and even if I succeeded in the end the task left me somewhat scarred. It's not so much that software itself decays, it's the dependencies that diverge relentlessly. No matter how pure we write our code, it always depends on something else, and if we don't port our code it will be left behind, eventually.
[...] a comment » Random Art (by Andrej Bauer, via his blog.) The program accepts a string of text (the “name of a picture”) and uses it as a seed [...]
I'm surprised that you seem not to be aware of the term "bit rot".
Andrej, I will watch for Random Art to be back, really miss it!
Well, it looks like it's been over three years since anyone commented. I'll just say that I love the Random Art generator/page/software, whatever you want to call it. I'm glad the page is still up. It has been invaluable to me. Thanks!
In a curious twist (which some might call "ironic", but I'm not sure that means what such folk think it means...) my browser can't quite guess what character encoding this page means to use. Specifically, I am seeing rogue "Â" characters in odd places, such as:
"There must be a software equivalent of theÂ second law of thermodynamics, let’s call it the Law of Rotting Software:
“All software eventually fails, even if it you leave it alone.”"
Hello! I'm a recording artist. Would you mind if I used randomart for a music project on Bandcamp.com? I want to use the random art generated as inspiration for instrumental/ambient works and then post the works with the art.
Go ahead, just make sure you give proper credit.
Hello! I have improved JS version of your random art generator, so it works 20% faster. If you'd like to update it, please contact me.
If you want to view the code for JS version: https://pastebin.com/ShRHVUFX