News for hackers. Stuff that matters.
Re:Search: .lenght - Github by Wilya on Saturday January 14, 2012 @02:05PM (#3464954)
In ruby, and I think most dynamic languages, this type of typo is likely to raise an exception. It could hurt, but a simple test run is likely to discover it.

The way javascript (which is what is linked) handles this, as amirhhz described it, leads to silent errors which could turn out a lot worse.

Re:Search: .lenght - Github by kaffeinecoma on Saturday January 14, 2012 @02:17PM (#3464990)
Yes, but it would raise the exception at run-time, and only when the particular path is taken.
Re:Search: .lenght - Github by xxbondsxx on Saturday January 14, 2012 @08:27PM (#3465958)
There's actually no exception, it just returns "undefined" and the if statement fails. That's why it's such a deadly bug -- no exception, and path dependent. Combine that with the async nature of JS and it's going to be a long night tracking that one down