Re:National (JavaScript) Security Agency
by crisisactor on Friday May 06, 2016 @06:16AM
(#11642835)
Stop advertising the NSA please
[ Parent
| on HN ]
This surely isn't advertisement. The code is terrible.
Try-catch jungle, ad-hoc URL manipulation, lack of caching, writing/constructing HTML in strange places, weak comparison operators in dangerous places (string vs lunch), etc.
As well as declaring variables in if blocks
if (!undeclaredVariable) { var undeclaredVariable = false; }
Yes. I'm very glad with the addition of 'let' to ES.
Re:National (JavaScript) Security Agency
by crisisactor on Friday May 06, 2016 @06:48AM
(#11642958)
Yeah but when visiting in Lynx, it displays fine. Lynx is the yardstick I use to judge a website. There are countless .GOV sites like this made on old Windows 2000 machines with Frontpage installed, but my point is the information is still communicated. It probably doesn't matter about some spagetti JS lumped in. I assume any sensible person will have JS turned off when visiting a URL like that anyway...
:) man have you even met today's web developers? Turning off js is like asking them to work in assembly. Now that Google has gone and built everything the OS does, into the browser the mordern day web dev is programmed to think that they exist to rebuild desktop apps in the browser. Communicating information simply in plain text is the last thing on their minds.
Re:National (JavaScript) Security Agency
by BinaryIdiot on Friday May 13, 2016 @10:30AM
(#11690612)
> have you even met today's web developers? Turning off js is like asking them to work in assembly.
To be fair asking them to build apps that don't require JS is like the old man yelling to get off their lawn :)
It's hard maintaining two ways of doing things and it's not always easy to make them both use the same avenue. I'm getting to the point where I honestly don't care either way.
Re:National (JavaScript) Security Agency
by geekamongus on Friday May 06, 2016 @08:05AM
(#11643337)
.gov websites are supposed to be ADA Section 508-compliant, so most of them do work in Lynx.
I see. I think it's important to make websites work well for as many clients as possible, including lynx. Ideally, JavaScript should only be used for enhancement of necessary interactivity. But when a choice is made in favor of some technology, I like to see it used properly. In this case maintainability, performance and robustness could benefit from improving this code.