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.
Rick Santorum's Fake Donation Meter
51–60 of 100 posts
Re: Rick Santorum's Fake Donation Meter
#52I just donated $17.99 so that they can buy Crockford's JavaScript: The Good Parts.
Re: Rick Santorum's Fake Donation Meter
#53I 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?
Reusable components and utility libraries is something different, of course.
Re: Rick Santorum's Fake Donation Meter
#54I 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.
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
#55For comparison, does someone want to post the source code to GMail's meter: "Over 10250.602608 megabytes (and counting) of free storage."
Re: Rick Santorum's Fake Donation Meter
#56Earlier 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)
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.
Re: Rick Santorum's Fake Donation Meter
#57Earlier 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)
Re: Rick Santorum's Fake Donation Meter
#58I 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?
Re: Rick Santorum's Fake Donation Meter
#59I 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.
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