4 ms·
I 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 = #
by zeratul 15y ago
I 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 1239 258892 = 0.0048
Objective-C 679 238051 = 0.0029
P.S. There is something wrong with Github's language breakdown algorithm, sometimes it shows same language twice with a different number of hits.
- koenigdavidmj 15y agoC# 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?
- JesseAldridge 15y agoHmm, I guess it's because length is a commonly used function in Javascript, but not in other languages. In Python you do len(list) instead, so the word length is more likely to appear in comments and therefore less likely to be corrected.
- sjwright 15y agoBecause the built-in .length property is frequently used, and will fail if misspelled. Whereas C and C++ programs tend to have a lenght operator implemented by the programmer, and from there the error gets snowballed by IDEs and debuggers.
- untog 15y agoC# is also a compiled language, so you wouldn't be able to get anything to run with a typo like that hanging around. I find it surprising that there are so many commits making that mistake!
- baddox 15y agoBeing a compiled language isn't sufficient to prevent "no method" errors. It's completely possible for a compiled language to define methods at runtime or use duck typing.
- lancefisher 15y agoIt shows up in comments and variable names frequently.
- cleaver 15y agoOdd that compiled languages (C, C++, Java) are higher than some interpreted languages (PHP, Javascript). Of course, the search will match comments as well as code, so it may just mean they have better comments. Also fun to search on "functino".
- RandallBrown 15y agoI can't think of anything in C or C++ that uses length off the top of my head. Size and Len, sure, but nothing that's length. I would guess that most of the spelling errors get propagated through autocomplete. That's how most of the spelling errors in my code get there anyway.
- jond3k 15y agoI noticed another problem is that the highlighter will select the language name as well as the term which means <?php and (c) Copyright are shown instead of the actual mistake. I put together a GitHub Illiteracy Index script https://github.com/jond3k/sandbox/tree/master/github-illiteracy-index https://github.com/jond3k/sandbox/tree/master/github-illiter... which you can play around with if you like :D
- rorrr 15y agoLANGUAGE #LENGHT #LENGTH = #LENGHT/#LENGTH C# 1352 937647 = 0.0014 <- best JavaScript 4252 2907459 = 0.0015 PHP 3116 1167924 = 0.0027 Objective-C 679 238051 = 0.0029 Ruby 1232 380484 = 0.0032 Java 7706 2348900 = 0.0033 Perl 1239 258892 = 0.0048 Python 3662 737292 = 0.0050 Ruby 10789 1690604 = 0.0064 C 18981 2902857 = 0.0065 C++ 9458 1315552 = 0.0072 <- worst