Live data from Hacker News

Rick Santorum's Fake Donation Meter

ricksantorum.com

51–60 of 100 posts

Re: Rick Santorum's Fake Donation Meter

#51

Earlier quoted context omitted.

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.

Ah, perhaps this is the case. Would have been fun to stumble across a "Help, I'm trapped in a bullshit factory!" comment or something. But that would not help one's career.

Re: Rick Santorum's Fake Donation Meter

#53
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?

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.

Re: Rick Santorum's Fake Donation Meter

#54
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.

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

I would assume that while the campaign was active they would periodically adjust the constants to reflect the current average.

Re: Rick Santorum's Fake Donation Meter

#55

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

IIRC GMail's meter is updated at a rate which is actually accurate, and is simulated so that the page doesn't need to keep asking google for the capacity.

Re: Rick Santorum's Fake Donation Meter

#56

Earlier quoted context omitted.

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)

http://en.wikiquote.org/wiki/Nathaniel_Borenstein

To understand how these problems can be addressed, it is instructive to consider an analogy. Imagine, for a moment, that somewhere in the basement of the Pentagon there are two computers. They are identical hardware, and they run identical software; they are as alike as two peas in a pod. On each of them, there is an executable procedure called "DestroyBaghdad". On one of the machines, executing this procedure does nothing. On the other, the effects of executing the procedure are disastrous, at least for the citizens of Iraq. The only difference between the two machines is a single wire coming out of the back of the second machine.[1]

The point, of course, is that nothing inherent to a computational language is dangerous; danger is posed only insofar as the effects of executing statements in a language include "side-effects" in the external world. If all the "wires" connecting a computational language to the outside world are cut, then executing programs in that language is harmless. (An exception to this claim is that such a program can still tie up the CPU, virtual memory, or swap space on a machine by going into an infinite loop; this can be handled via resource limitations.)

[1]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.

http://www.guppylake.com/~nsb/CSCW-ATOMICMAIL.txt

Re: Rick Santorum's Fake Donation Meter

#57

Earlier quoted context omitted.

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)

Had me laughing so I tried to find it: http://en.wikiquote.org/wiki/Nathaniel_Borenstein

Re: Rick Santorum's Fake Donation Meter

#59
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.

Unless they've changed the code, there are some manually adjusted values that estimate the average donation rate based on some magic number they plugged in from their own projections (/propaganda if you think this was intentionally misleading).

    val1 = 44000;
    val2 = 70000;
    maxVal = 100000;
    deltav = val2 - val1;

    vchange = deltav / deltat;

    if (now 
If I had to guess, val1 was how many committed donations they had at 11am April 24th and val2 is how much they anticipated raising in the following 13 hours of April 24th. Note that Santorum suspended his campaign April 10th, so it looks like someone probably was updating this manually until the campaign was fully disbanded.

Re: Rick Santorum's Fake Donation Meter

#60

"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

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