[Javascript] Object reference usage (was Javascript and FF)

tedd tedd at sperling.com
Tue Sep 1 08:19:22 CDT 2009


At 11:32 AM -0700 8/31/09, Paul Novitski wrote:
>(Those return alerts are purely for logic illustration and aren't
>what I do in production code.)

Why not?

I can see hiding errors from hackers when writing server-side 
scripts, because you don't want to give them any information that 
they may of use against your code. But with client-side scripts, the 
hackers have all the code -- so who cares if they see an error or 
not? What harm does it do?

Additionally, I would rather have a client say "Your code doesn't 
work -- it report 'Paragraph is empty'" than say ""Your code doesn't 
work".

In addition, the client might even look at the error and think it's 
their fault and provide a solution themselves (i.e., add a paragraph).

Additionally, later when you (or another programmer) review the code 
alerts provide great documentation.

So why not leave in production alerts?

Cheers,

tedd

PS: And thank you for your other postings -- quite informative reading.
-- 
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com



More information about the Javascript mailing list