
Rick Santorum's Fake Donation Meter - bithive123
https://www.ricksantorum.com/stillneedhelp/thermometer.js
======
barrkel
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.

~~~
thebigshane
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.

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

~~~
espeed
I tweeted it: <https://twitter.com/espeed/status/206150118083280897>

~~~
mahmud
you have 211 followers .. I don't think you have wider reach than HN.

~~~
espeed
It's hash-tagged on #Santorum.

~~~
mahmud
oh, that would do it.

------
FaceKicker
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, the donation meter
will read $-17 million.

Edit: Actually, this isn't quite accurate, it's closer to one dollar per two
seconds. 1/(vchange*1000) = 1.7976923076923077 seconds to be exact...

~~~
sikhnerd
Looks like they took the page down

Forbidden

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

------
ChuckMcM
What? You mean a politician was using a simulation and presenting it as
definitive? I'm shocked I tell you, shocked!

(with apologies to Captain Renault :-)

You could just read the quarterly reports he files with the FEC if you
actually wanted to know how much he was bringing in. I suppose you could get
him in hot water as an ethics violation for campaign reporting but outrage? A
bit over the top I think. There are billboards that had a running total of the
California state deficit, does anyone think they were repeatedly reading some
sort of get_balance() api at the state treasury and putting it up? No, its a
prop, a gimmick, an illustrative tool, and nothing more.

~~~
ryguytilidie
Seems a like a bit of an exaggeration to peg the OP as "outraged". They simply
provided a link to an untruth.

------
caseydurfee
"The right to private variables is not the right to a common good. It’s a me-
centered right, that obviously started in the sexual revolution with
contraception and obviously quickly evolved to abortion, and now has found its
way into the marriage debate. And all those acts that were self-giving acts,
self-sacrificing acts, have been polluted by this right to privacy." -- Rick
Santorum

~~~
Canuteson
I'm pretty sure PEP 8 makes a sImilar argument for why privacy of underscore
variables isn't strictly enforced in python.

------
Osiris
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?

~~~
Deestan
As long as it's "single page bound" JS like this, I honestly don't think it
matters one bit.

Reusable components and utility libraries is something different, of course.

~~~
sjs
It's still incredibly error prone and just bad practice. It's a telltale sign
of a bad developer because a good dev would instinctively just use var without
thinking about it. Good devs may make a mistake here or there but this is
clearly well beyond a forgotten var keyword.

~~~
slantyyz
>> It's a telltale sign of a bad developer

I'm just guessing, but the site was probably not developed by a technical
team, probably some web shop that specializes more on the
design/layout/content side and not on the JS side.

So it's likely it's the work of a non-developer than a bad developer. The net
result is the same (bad code) but the distinction is that the code was
possibly written by someone who wouldn't even be considered a developer.

------
paulgb
In case they change it, here is a copy: <http://pastebin.com/3Wv4AJSF>

------
dangoldin
Pretty amusing. Google actually does something similar on the Gmail homepage
to indicate the amount of free storage but they're doing an actual estimate
using linear interpolation. You can view the source on the gmail home page and
look at the updateQuota method.

------
luigi
I just donated $17.99 so that they can buy Crockford's JavaScript: The Good
Parts.

~~~
ender7
var statements are for commies.

~~~
sophacles
If your variables aren't doing anything wrong, what do they have to hide?

------
brackishlake
Also funny: "We ran a strong race and practiced fiscal discipline."

For a fundraising drive to fix their debt problems.

------
VikingCoder
For comparison, does someone want to post the source code to GMail's meter:

"Over 10250.602608 megabytes (and counting) of free storage."

~~~
duskwuff
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.

~~~
artursapek
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

------
evolve2k
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.

~~~
derleth
> Americans might see this as acceptable

Do you have any evidence we do?

------
nikcub
wait, did anybody actually think those donation counters were _real_?

~~~
encoderer
Honestly in other cases they are. I had personal experience developing tools
used for Howard Dean's 2004 primary campaign (as a volunteer not staff) and in
that case it was certainly real.

I'd be very, very surprised if the ones used by Ron Paul and Obama weren't
real. They have good engineering talent there, and (in the case of Obama at
least) good political talent. This runs contrary to both.

~~~
cbr
I was going to check and get back to you, but I can't find one on either of
their sites.

~~~
encoderer
They run them during specific fund-raising drives.

You can also see them on peoples personal MyBO pages.

~~~
yahelc
Can confirm that the thermometers on Obama fundraising pages (MyBo and others)
are real (not simulated and not manipulable). It's a feature of the donation
software they use.

(My employer develops it.)

------
IDisposable
Same thing as the Google GMail "space available" counter. As long as you back
it up by real numbers and adjust the rate appropriately no harm, no foul.

------
ejesse
To be fair, it's not any less accurate than prayer.

------
erreon
Though I have no idea how much has truly been donated to Rick Santorum, but I
would bet that growing thermometer did help contribute to that. Perception is
an incredibly strong tool that can be used to elicit reactions like donating
"because everyone else seems to be". Sad that they're using such a tacky
tactic.

------
grobot
CiviCRM (which appears to be Santorum's campaign tool) comes with a
fundraising thermometer out of the box.

------
noomerikal
NICE! Looks like he's giving back - <http://imgur.com/PeVdv>

------
hodgesmr
Aren't there rules about political candidates disclosing donations? And
doesn't this violate those rules?

~~~
jlgreco
Is he technically still a candidate? Maybe he's getting around those rules by
not being a candidate anymore.

~~~
mc32
I think he suspended his campaign. Suspending means that while for all intents
and purposed but one, the campaign is ended. The exception is that it allows
the candidate to raise money (usually to pay off campaign debt). Ending a
campaign means you hold the bag, if you're in the red, as I understand it.

So, technically, yes, still a candidate.

~~~
btilly
Actually your candidacy is its own separate legal entity, so you're not
legally holding the bag. However your reputation is at stake, if you ever want
to run for public office in the future, nobody will lend you money if you've
proven to be a bad credit risk in the past.

See [http://www.businessweek.com/articles/2012-04-19/the-
business...](http://www.businessweek.com/articles/2012-04-19/the-business-of-
ending-a-presidential-campaign) for more.

~~~
mc32
Ah, good distinction. Thanks for the explanation.

------
Havoc
How does one tell when a politician is lying...

------
wizzard
This is awesome. I know of scammy companies that have gone out of their way to
use actual live subscriber counts on their sites, yet this idiot uses a fake
one.

------
joshuahedlund
Wasn't there a post on HN recently about YouTube's viewcounts being
extrapolated and not actually real-time?

------
ravloony
Witch hunt anyone?

------
zem
someone seems to have thrown a hasty 403 atop
<https://www.ricksantorum.com/stillneedhelp/>

------
lightyrs
pander.js

------
thomasluce
What? A politician being disingenuous? I'm shocked! SHOCKED!

~~~
sold
This is not reddit.

~~~
RegEx
This is an insightful comment.

------
paulhauggis
I bet there are left-wing politicians that do the same thing...but we won't
ever see them here because republicans are the only ones that are bad.

------
rsanchez1
Alright, we got our Santorum fix for the month. Thanks, Reddit.

