Important! increase this value by 1 everytime a keyword is excluded below

You'll probably have heard about the Australian government's dumbass plan to introduce mandatory government-controlled censorship of the internet, by forcing ISPs to install URL filters. According to a story in today's ElReg, the website of the minister responsible, Stephen Conroy, has a tag cloud reflecting the most popular search terms entered into the site's search facility. The amusing point of the ElReg story is that they've crudely hacked the code that generates the cloud tag to exclude the term "ISP filtering", which made me lol, but there are a few other WTFs in the code as well:

So, they forgot to increase the value of the integer constant 15 by one every time a tag is excluded, meaning that you can tell that tags have been excluded because there will be less than 16 items in the tag cloud. (They also apparently forgot that you can't change the value of a constant, and trying to decrement i might have worked better than trying to increment '15'!)

I also notice that they recount the frequency of all the items in the entire tag cloud array every time round the loop, just in case it has magically changed since last time. That's after they've already repeatedly iterated across the entire array of terms once for each unique term. Quadratic algorithms must flow through this guy's blood.

On the other hand, it does have a variable called 'mullet', which I found stunning...

Evidently they aren't urlencoding values returned from a DB, but rather just manually embedding links... and failing at that too. I'm guessing they aren't using any server-side code on that page, because that's the first tag cloud I've seen generated with JS.

Since the exclusion is a crude hack that only excludes the one specific phrase "ISP Filtering", surely it must be possible to come up with a whole host of creatively indecent search strings that reach that guy's site and can be Googlebombed into the tag cloud.

Since the exclusion is a crude hack that only excludes the one specific phrase "ISP Filtering", surely it must be possible to come up with a whole host of creatively indecent search strings that reach that guy's site and can be Googlebombed into the tag cloud.

I thought those were search strings used on the site's own search feature, rather than the searches that led to the site, but maybe you're right, in which case we just need to creatively falsify our Referer: headers to look like google search results urls.

However isn't TRWTF that this array is not automatically generated and inserted into the page but manually updated from time to time anyway, and they could have just not included all those "isp filtering" strings in the first place?

However isn't TRWTF that this array is not automatically generated and inserted into the page but manually updated from time to time anyway, and they could have just not included all those "isp filtering" strings in the first place?

Mr Bochniak is reported as saying: "No, I didn’t write it for their website. They must have taken a version of my ‘tag cloud’ Javascript off one of my website tutorials. Their code is basically a modified version of mine."

However, at least last week, techies could, if they so wished, have discovered the identity of the person whose code was "borrowed" by government. Not any more, however, as not only has Mr B’s name been removed – but also the name of the person who amended it, allegedly "at the request of family members".

On the other hand, it does have a variable called 'mullet', which I found stunning...

And on the OTHER other hand... having a variable called "mullet", and it being an incremented counter, and NOT SEIZING THE OPPORTUNITY to have a "mullet++;" line... is SO disappointing. I'm disappointed.

Really? Creating a semicolon-delimited list and then splitting it on semicolons? I guess someone copy-pasted the list (or it was populated from a database), but really, how hard is it to write a little function to render it as a Javascript array right out? Also, why initialize var split to a new Array(); when you're just going to be re-assigning it on the next line?