Comment on JavaScript ( (__ = $ + $)[+$] + ({} + $)[_/_] +({} + $)[_/_] )Comments−michaelty15yI wonder if you could use this in an interview...−weixiyen15yThis is great idea, if your goal is to not hire anyone.−bl4k15yexcept HN readers−gokhan15yHow many of them can understand this?−jonursenbach15yBefore or after this article was posted?−gcb15yeasy. show it to him and ask "in 1 to 5, how does that code look like the code you ship to production currently".any answer other than "Zero" or "wtf-look", do not hire.−Natsu15y> any answer other than "Zero" or "wtf-look", do not hire.What if you're hiring someone to test for XSS exploits?−MichaelApproved15yTesting for XSS exploits isn't production code so the answer should still be zero.−Natsu15yIt could certainly appear in the source of an XSS scanner that tried to inject code like that everywhere it could find.
Comments
I wonder if you could use this in an interview...
This is great idea, if your goal is to not hire anyone.
except HN readers
How many of them can understand this?
Before or after this article was posted?
easy. show it to him and ask "in 1 to 5, how does that code look like the code you ship to production currently".
any answer other than "Zero" or "wtf-look", do not hire.
> any answer other than "Zero" or "wtf-look", do not hire.
What if you're hiring someone to test for XSS exploits?
Testing for XSS exploits isn't production code so the answer should still be zero.
It could certainly appear in the source of an XSS scanner that tried to inject code like that everywhere it could find.