Live data from Hacker News

Rick Santorum's Fake Donation Meter

ricksantorum.com

11–20 of 100 posts

Re: Rick Santorum's Fake Donation Meter

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

Re: Rick Santorum's Fake Donation Meter

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

Re: Rick Santorum's Fake Donation Meter

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

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

Re: Rick Santorum's Fake Donation Meter

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

I find the 8 space indentation most disturbing.

Re: Rick Santorum's Fake Donation Meter

#20

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.

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.
Post reply on HN