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.
We choose to go to the moon!
UPDATE: They took the donation page down...
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 < t1 && val1 == '0')
val = val1;
val = Math.floor((now - t1) * vchange) + val1;
I would assume that while the campaign was active they would periodically adjust the constants to reflect the current average.
But that's a big theoretically. This is almost certainly malice.
And it would almost certainly have gone unchecked if the developer had only hidden the BS generator script on the server side.
But as others have pointed out, that's probably asking too much given the state of this code and given that the main page 403's but they left the BS script serving.
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...
You don't have permission to access /stillneedhelp/ on this server.
(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.
Regardless, it's almost certainly false advertising which as you mentioned is ethically questionable especially since this is supposed to be a 'leader' of citizens.
Reusable components and utility libraries is something different, of course.
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.
a) Because it isn't "right" as such. It's just "better" if the code is going to be reused. Which it isn't.
b) The code style serves as documentation. I can clearly read from this code that it's not a reusable component. It is now easier for me to get an idea of how and where this code is being used in the site.
c) Personally, I'm wary of "pre-emptive generalization". Every layer of abstraction makes the code slightly less readable. Also, unless there exists at least two use cases right now, you're not likely to get the reusability right anyway.
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.
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.)
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
For a fundraising drive to fix their debt problems.
"Over 10250.602608 megabytes (and counting) of free storage."
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():
Do you have any evidence we do?
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.
You can also see them on peoples personal MyBO pages.
(My employer develops it.)
So, technically, yes, still a candidate.
See http://www.businessweek.com/articles/2012-04-19/the-business... for more.