Live data from Hacker News

Rick Santorum's Fake Donation Meter

ricksantorum.com

41–50 of 100 posts

Re: Rick Santorum's Fake Donation Meter

#43

This is used to decide what dollar amount to display on the donation meter on this page: https://www.ricksantorum.com/stillneedhelp/ You can infer from the Javascript, but it just displays a dollar amount equal to the number of seconds elapsed since a certain time (edit: whoops, see below), according to your computer clock. If you refresh every second it will go up by $1 each time. If you set your clock back a year,…

Looks like they took the page down

Forbidden

You don't have permission to access /stillneedhelp/ on this server.

Re: Rick Santorum's Fake Donation Meter

#44
It fascinates me that Americans might see this as acceptable or even that it is regarded as most likely to be totally legal and hence acceptable in nature. In Australia I would be very confident that this type of falsified campaign disclosure would be illegal or at least fall foul of a whole range of parliamentary and governmental standards.

Re: Rick Santorum's Fake Donation Meter

#45
post #6

I find it most disturbing that they are polluting the global namespace with all those variables and functions. Don't JavaScript developers these days understand how to properly scope their JavaScript?

Are you really asking why a developer tasked with creating something intentionally deceptive didn't use best practices? I'm thinking not a lot of care or attention to anything was paid that day.

Different kind of ethics: "It should be noted that no ethically-trained software engineer would ever consent to write a DestroyBaghdad procedure. Basic professional ethics would instead require him to write a DestroyCity procedure, to which Baghdad could be given as a parameter." (lost the source of the quote)

Re: Rick Santorum's Fake Donation Meter

#47

For comparison, does someone want to post the source code to GMail's meter: "Over 10250.602608 megabytes (and counting) of free storage."

GMail's meter is fine -- it's displaying the state of a value which Google has decreed will increase at a set rate. Unlike Santorum's donations, it's not an unpredictable measurement.

Indeed. It looks like they have their goals set for a long time. http://i.imgur.com/WvYcq.jpg

It finds the closest entry in there to the current value of "new Date().getTime()". Then it just adds (what roughs out to) .000004 for every second's difference between the 0 value and the current getTime() value. So today it reads 10250 MB, which must come from index 2 of that array + enough seconds to add 10 MB and some. Definitely more legit than Santorum's.

Here's the code for the counter (it's embedded in that HTML file) http://pastebin.com/8tebjT79

The actual subtractions of the current time from the one in the array seem to be more detailed than what's put on the page, which is being rounded. A sample of input for format():

    10250.60874337952
    10250.608747448896
    10250.608751518273
    10250.608755583586
    10250.608759652963
    10250.608763722339
    10250.608767787651

Re: Rick Santorum's Fake Donation Meter

#48

Earlier quoted context omitted.

Probably wanted to make it more readable, it's not even minified.

I don't think a JSLint-compliant, file-minifying developer would need to resort to this kind of work.

I 'm implying s?he did it on purpose to shame his/her bosses.

Re: Rick Santorum's Fake Donation Meter

#49
post #27

I don't think there's anything wrong, in principle, with this approach, so long as the simulated rate is calibrated frequently to the actual average donation rate. Having it all wired up properly would require a whole lot of infrastructure, particularly for donation mechanisms that aren't online and aren't all tied in to a single system.

There doesn't appear to be anything in this code to calibrate to the actual average donation rate. In fact it's not tied to any real amounts or rates at all. It's just a function of the current datetime. UPDATE: They took the donation page down... Forbidden You don't have permission to access /stillneedhelp/ on this server.

That was a fast response. Does someone on HN work for Santorum?

Re: Rick Santorum's Fake Donation Meter

#50

Earlier quoted context omitted.

There doesn't appear to be anything in this code to calibrate to the actual average donation rate. In fact it's not tied to any real amounts or rates at all. It's just a function of the current datetime. UPDATE: They took the donation page down... Forbidden You don't have permission to access /stillneedhelp/ on this server.

That was a fast response. Does someone on HN work for Santorum?

I tweeted it: https://twitter.com/espeed/status/206150118083280897
Post reply on HN