Why I LOVE ReSharper
I mean, just look at this. This is magic.
More to the point, think about what this means to try to implement something like that. I wouldn’t know where to even start.
I mean, just look at this. This is magic.
More to the point, think about what this means to try to implement something like that. I wouldn’t know where to even start.
No future posts left, oh my!
Comments
You just need to run a search query for concdi in case-insensitive mode, thats all.
I don't think it would be too difficult. You could possibly do the search in about 5 lines of powershell using the $dte object in the package manager console.
Something like this in powershell http://stackoverflow.com/questions/3560823/how-can-i-get-only-classes-defined-in-the-current-project-in-envdte although I'm not sure how to get at files in the BCL.
ReSharper is an awesome tool though. Perfect if not for the performance decrease and lock ups.
Brute force: waste of resources (memory, cpu), not much value added, and visual studio gets slower.
Palesz, what search query though? A contains? That won't find anything in this case.
My guess is they split each symbol on capital letter and then do a largest common substring (or maybe levenshtein distance) search on each symbol-part. Then take all those symbols which has a match length of more than 0 in all of the capital-parts in the symbol. That way you get the symbols which contains atleast one character from the searchstring in each of the symbol-parts.
They call it "fuzzy search", and it also works in Go to... commands. Yes, it's awesome!
Resharper is both a great tool and an impressive piece of software in it's own right - I'd be a bit lost without it these days :)
You can use a trie. When what the user has typed diverges from the entries in the trie you stop navigating the trie, take all the remaining nodes in the true and calculate the Levenshtein distance between them and what the user has typed. Should be pretty quick as long as you restrict it from happening high up the trie (say a minimum of n characters before this is done).
If you'd instead typed, CD or CDE, Visual Studio without extensions would have provided similar suggestions, in case you weren't aware.
Longest Common Subsequence.
http://en.wikipedia.org/wiki/Longest_common_subsequence_problem
Rather trivial, C++ impl:
https://github.com/juanplopes/valladolid/blob/master/src/10066.cpp
This feature is called "match on camelhumps". It matches on character case. It is awesome and I use it all the time. 4 letters are often enough to find any class unambiguously.
I don't know how to program without intellisense. I really don't. Who can remember all these names (and the compiler requires you to remember them without any mistake at all).
This leads me to the question: How do people program in dynamic languages? Are the heuristics their IDEs use good enough?
A good dynamic language will take a different approach. As of 3.5 .net has 11,000 classes (http://blogs.msdn.com/b/brada/archive/2008/03/17/number-of-types-in-the-net-framework.aspx). I doubt ruby has that many in the core. OTOH a bad dynamic language like PHP has hundreds of functions in the global namespace, with no convention on argument order, making it impossible to use without a good IDE.
http://en.wikipedia.org/wiki/Suffix_tree
http://en.wikipedia.org/wiki/Suffix_tree
It's pretty difficult to post on your blog: confirmation appears each time regardless whether CAPTCHA is correct or not, URI is not translated into a hyperlink, and paired underscores inside URI are interpreted as markup for italics. Let's try with double underscore on each side :)
http://en.wikipedia.org/wiki/Approximate__string__matching
I love it because sometimes I can just memorize a short word for some common types in an application. And sometimes that short word can be really funny. haha
A variant of this problem was on the final exam for the online course "CS212-Design of Computer Programs"
http://www.udacity.com/view#Course/cs212/CourseRev/apr2012/Unit/496001/Nugget/515001
Why didn't I learn something new by all the comments?
Comment preview