The Ritual of Rot

Hello! This weekend (November 12-13, 2022) I decided to try to make a little project. You're looking at it right now. This site, including all HTML, CSS, and images are constantly degraded every time the resource is loaded. Depending on how popular this site is you may have trouble reading it. The Ritual resets every hour, so if it is completely unintelligible, please come back soon.

I was inspired by a link I found on Hacker News to a site that displayed an image that got more degraded each time someone visited it. This was done by re-encoding the image as a JPEG over and over again, causing the artifacts from JPEG's lossy compression to grow and grow until the image was unrecognizable. I was intrigued by a comment on the post, and wanted to see what a web server that performed a similar operation would look like.

I also tend to have very strong loss aversion, so knowing that someone could see my work in this degraded state is somewhat disconcerting for myself.

Code

I wanted it to degrade any type of file but to keep things simple, I chose to operate at the byte level. When the server is started up, it loads a copy of each file it is meant to serve into memory, and begins a Ritual to degrade it by a single, random byte each time it is requested. When the request comes in the result of the previous Ritual is served and a new one is performed - so by viewing this site you have contributed to a degraded experience for the next person who visits it. I threw it together in a few hours in Go, not a language I use in my day job (I am an avowed Clojure fanatic) but one that worked very well for the task I had at hand. I was pleased by a lot of the addiitons to Go since I last used it 8 years ago. I apologize to the Go team for using their tool for such an inane purpose.

Normally, naming things in software engineering is a huge pain, but in this case it was amusing. The struct that holds each file's status is a Ritual, the file is theSacrifice, the bytemask for the file (the parts I will remove) is theCuts. It may not sound like much but it made me happy.

Note lastly that I do not degrade the various HTTP headers and such that are required for normal operation of the site. The only thing that degrades is the content of each HTTP response.

Markup & Styling

It's particularly interesting to see how the browser tries in vain to render a site that is slowly becoming more and more haphazard and disheveled. Since writing CSS is one of my least favorite activities, I chose to use an open source mini framework called Sakura to make this somewhat pleasant to read. Please ascribe any ugliness to the Ritual and not the Sakura project. How does the site look to you? Is the styling effective?

Images

As a hobbyist photographer, the effect of the Ritual on images is profound. As the Ritual progresses, lines of the image start being removed. Even though I am only removing a single byte each time, due to the way JPEGs work, the point from the removed byte to the end of what would be that line is removed. What do they look like when you view them?

Let me show you some examples. Here is a photo I took a year ago at the New Braunfels Wurstfest. I liked the eclectic collection of colors all in neat rows.

A photograph of multicolored balloons at a small fair.

At a recent trip to the Houston Zoo, I took this photo of a beautiful Bald Eagle that lives there. I am particularly proud of this photo, so watching it decay is somewhat painful. Good thing I have backups.

A photograph of an American Bald Eagle sitting on a branch, facing away from the viewer and looking to the left.

Here's another interesting one. I generated this using one of those neat AI image generator tools, though at this point I forget what the prompt was. As a PNG, the degradation is much more dramatic than a JPEG as it quickly becomes unreadable due to the lossless compression used.

an AI generated image of a man sitting at a table with a single bare lightbulb above him.

The last photo I will use is one I took of a new building in downtown Austin. This is my favorite type of photography, as I really like simple geometric photos that are almost abstract. They can be disorienting to figure out what you're looking at.

An image of a building taken at an extreme angle against a clear blue sky.

Conclusion

If you read all this, thank you for taking the time. Depending on how popular this site is and when you view it, it may have taken considerable effort. Please let me know if you enjoyed it by talking to me by your method of choice below, and backups of your important files.

About Me