How My Website Was Eaten By The Big Nothing

Those of you who follow me on Twitter will probably remember that around the time Scienceblogs shifted to a new format, I was busy doing a final piece of development on my old website, SciencePunk.com. I felt it had sat in stasis for too long, and I’d outgrown a lot of the views and content on there. I wanted to paint something fresh onto it, but that required a blank canvas. Rather than delete everything (which seemed like quite a blunt act), I thought it would be more fun to visualise the neglect that it was suffering.

So, with the help of  Steve Moss, I had a plugin that would gradually decay SciencePunk.com. I called it digital rust, and you can see the code for yourself here. The code is nestled in the footer of the website, and triggers every single time a page is loaded. When this happens, one blogpost is selected at random from the hundreds of entries, and ten per cent of the characters in the title and main copy are replaced by blank spaces. The only exception is that the page you are looking at will not be the one degraded. As such, it is the least-viewed pages that decay first, while the most-trafficked ones suffer the least. With remarkable speed, my website started to degrade.

Degraded site

Recently, I noticed that SciencePunk.com was failing to load. On further inspection, it seemed by decay code had gotten a little out of hand.

"Edit post"

So what happened?  When the code is run, it counts how many characters appear in the text of the blog post and therefore how many need to be replaced to achieve a ten per cent decay rate. A post that has 1,000 characters will have 100 replaced by blank spaces.

However, there’s a problem: all the popular browsers automatically compress multiple spaces. To preserve the word structure and give the appearance of missing letters, non-breaking spaces are used in the digital rust plugin. The HTML code for a non-breaking space -   - is six characters long. So in the final output, those 100 blank spaces are rendered using 600 characters, and the blogpost is now an extra 500 characters long. The next time it is selected for decay, the 1,500 character long post has 150 characters selected for vaporisation, and they become 900, bumping the blog post up to 2,250 characters. And so on – and on, and on, until the website starts to crash because all the blogposts are gigantic strings of blank spaces.

Some posts seem to be hardly affected, while others are sinking under the weight of pseudo-blank canvas. This shouldn’t surprise us – the bug outlined above leads to an exponential rise in blog post length. The decay code is actually making my website longer. It’s an aggressive nothingness, a big bang that explosively increases space whilst wiping out the space that it’s in.  I've deactivated it for the moment to give myself a chance to debug the system.  Ultimately, it looks like the decay code needs to be degraded.

Tags

More like this

As some sharp-eyed reader may have already spotted, the SciencePunk blog has relocated to the Seed Media Group's ScienceBlogs. Let's take a moment to absorb these new surroundings. OK, done? Those of you who have already run back to check sciencepunk.com will find it too has changed substantially…
As some sharp-eyed reader may have already spotted, the SciencePunk blog has relocated to the Seed Media Group's ScienceBlogs. Let's take a moment to absorb these new surroundings. OK, done? Those of you who have already run back to check sciencepunk.com will find it too has changed substantially…
Frank Swain just moved in this morning, so the boxes are still unpacked. You can see his old work on sciencepunk.com, Guardian Science Blog and Sence About Science, but from now on, he'll be writing on Science Punk, so go there and say Hello!
I've been going insane this morning, thinking I might have mysteriously lost my ability to type, or even recognize valid HTML…and I've been seeing really weird stuff everywhere I type on the web. It looks like the problem is Webkit, the browser I usually use. I updated it this morning, and it seems…

Can't you just use a hardcoded non-breaking space? Alt-255.

This is brilliant! I was trying to think of all the ways this is both symbolic and microcosmic of so many facets of the universe, but then my brain exploded. Hate it when that happens.

I'll go get my towel.

The nanos ate your site!!!

Amazing what a bug can do to a system.

It's... the NOTHING!