For the record, Github's search index is wayyy out of date sometimes. The second user here is me and I deleted that user like two years ago: http://cl.ly/0y271f0T3G0X2J1L022E
Search: .lenght - Github
81–90 of 106 posts
Re: Search: .lenght - Github
#82And this is why we have testing frameworks.
... and compiled languages. Testing won't ensure 100% code coverage.
Re: Search: .lenght - Github
#83Earlier quoted context omitted.
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.
Yes, but it would raise the exception at run-time, and only when the particular path is taken.
Re: Search: .lenght - Github
#84I 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…
Also fun to search on "functino".
Re: Search: .lenght - Github
#85My experience is more with languages that are typically compiled and would report this error as an error fairly early on, so the coder would correct it long before checking the code in. What's the trade-off by having "undefined" returned instead of having an error reported as soon as the code is loaded?
Now the normal (and optimized) route is to find the method on a’s method table and then call that, but if a doesn't have that method then a second method may be called to allow this to be handled. Once you have that sort of mechanism you can make ORM libraries that dynamically examine a schematic at run time and generate accessor methods only as they are needed, decorators, proxies and many other patterns become wonderfully simple, and there are often many more opportunities for meta-programming at run time.
The downside is of course that it becomes harder to find errors when writing or compiling, but tight integration of your development environment with your runtime can help with this.
Re: Search: .lenght - Github
#86I 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…
Re: Search: .lenght - Github
#87 # Language Illiteracy
1 C 0.02877583
2 Perl 0.01635618
3 Ruby 0.01560477
4 JavaScript 0.01330989
5 Shell 0.01235425
6 Python 0.01046104
7 PHP 0.00910218
8 Java 0.00736395
(For height, length and hierarchy, averaged out)And you thought this would end up being a PHP joke...
https://github.com/jond3k/sandbox/tree/master/github-illiter...
Re: Search: .lenght - Github
#88Earlier quoted context omitted.
Fantastic. If you use vim, you should have this in your .vimrc: " Remove any trailing whitespace that is in the file autocmd BufRead,BufWrite * if ! &bin | silent! %s/\s\+$//ge | endif
I prefer using the vim-trailing-whitespace plugin and fixing it manually: https://github.com/bronson/vim-trailing-whitespace
which has some advantages (described in the README)
Re: Search: .lenght - Github
#89I 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…
Odd 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".
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.
Re: Search: .lenght - Github
#90Earlier quoted context omitted.
Ah, aggressive trailing whitespace removal. That I can completely get behind. I've already got command-s bound to a custom macro that strips trailing whitespace in TextMate for myself and my co-workers; but this would be an even more inclusive solution.
Fantastic. If you use vim, you should have this in your .vimrc: " Remove any trailing whitespace that is in the file autocmd BufRead,BufWrite * if ! &bin | silent! %s/\s\+$//ge | endif
set list
set listchars=trail:•
In other people's code, use `set nolist` to prevent hyperventilation.In general, explore `help list`.