Earlier quoted context omitted.
It's not, because reutrn is a syntax error, but .lenght is valid and would return `undefined`.
Yes it is, it would work fine as a variable . E.g. var lenght = 23; console.log(lenght); will not cause any troubles. And many of the results returned by the search are of this kind.
Search: .lenght - Github
51–60 of 106 posts
Re: Search: .lenght - Github
#52Re: Search: .lenght - Github
#53Re: Search: .lenght - Github
#54Earlier quoted context omitted.
In a static language this would be flagged as an error. I assume something less than ideal happens in languages such as Ruby. I once worked at a company where a very early piece of code had a typo "properites" instead of "properties". This misspelling became institutionalized, and was used throughout the codebase because it was deemed too expensive to fix. And this was with a static language (with good IDE refactorin…
I'm confused as to why they couldn't simply: grep -R properites .
Re: Search: .lenght - Github
#55Even the search has a bug. The query is for ".lenght" but many of the highlighted results are just lenght without the dot.
Re: Search: .lenght - Github
#56And this is why we have testing frameworks.
Re: Search: .lenght - Github
#57I remember seeing a Github bot a couple weeks ago that strips out whitespace and adds a .gitignore file to a repo (I also remember this really rubbing some people the wrong way). This search indicates that it would probably be useful to have a linter bot running on Github for all the popular languages. It would find syntax errors, common mispellings, and compilation issues, and then submit pull requests to fix the is…
Perhaps it would be more productive to advocate the use of local pre-commit hooks. Git makes it very easy to configure validation locally long before anything gets sent to Github. Would be nice if Github provided better documentation and a selection of validation templates to include in new projects. This would better leverage the power of Git and its distributed nature than a bot running on Github.
Re: Search: .lenght - Github
#58Earlier quoted context omitted.
I'm confused as to why they couldn't simply: grep -R properites .
Obviously you have never worked on a code base with 1000s of developers. If you edit almost every file then basically everyone needs to stop writing new code while the change is made. Otherwise the merges others have to do is going to be a disaster.
Re: Search: .lenght - Github
#59I thought this is actually interesting but I would like to know if >4k misspellings is a lot or not. Here is one way to do it: LANGUAGE #LENGHT #LENGTH = #LENGHT/#LENGTH JavaScript 4252 2907459 = 0.0015 C 18981 2902857 = 0.0065 Java 7706 2348900 = 0.0033 Ruby 10789 1690604 = 0.0064 C++ 9458 1315552 = 0.0072 PHP 3116 1167924 = 0.0027 C# 1352 937647 = 0.0014 Python 3662 737292 = 0.0050 Ruby 1232 380484 = 0.0032 Perl 12…
C# I can understand being so low, since it's almost always written in Visual Studio or MonoDevelop (both of which provide autocompletion). But how is JavaScript the next lowest?