Bing Code Search

Download this episode

Download Video

Download captions

Download Captions

Description

In the episode, Robert is joined by Youssef Hamadi and Yi Wei, who show us the Bing Code Search extension for Visual Studio. With this extension, you can search for code samples across the coding community, including MSDN, StackOverflow, Dotnetperls and CSharp411. You don't need to switch context and go to the browser to search. You can search from within Visual Studio and then directly add code samples to your code. You definitely want to check out this cool and handy tool.

Resources

 

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image
      Gordon​Beeming

      Has the /// feature been dropped? Not sure if another extension is conflicting with it but doesn't work anymore.

      we used to be able to do something like

      /// How do I read a file

      and then tab and it would popup the results

    • User profile image
      SuperKoder

      The tool makes programmers not to think ,process on their own way of solving a problem. It just make them simply to hunt a code. And hence I disagree it's being added as an extension tool.

    • User profile image
      Gordon​Beeming

      @SuperKoder, my thoughts below

      If you think about it in a different way. Having the extension makes for a smaller time between trying to find a code snippet and actually using what you find which will probably make there be less of a chance of you loosing your thought patterns. Also just switching to a browser opens up so many things that can distract you and again make you loose your thought pattern.

    • User profile image
      jlomax

      If you have Resharper installed (who doesn't ???) then you'll need to map Tools.LaunchSnippetSearch to some available key (they suggest ALT-A). Wish there was just a window I could have chosen to open.

    • User profile image
      rsix

      I don't generally like to copy n' paste code without understanding what it is I am doing and I could see this tool leading a lot of beginner developers down that path.. Other than that this tool is great if you forget how to use a specific API in .NET ocean of classes and need to do a quick search for an example, installed and keeping :)

    • User profile image
      rogreen

      @rsix: Don't you think that retrieving a block of code that works is a great way of learning and understanding a particular concept? If I want to learn a new concept, such as reading or writing to a file or encrypting some text, I don't want to have to start in the docs at the class library level. I want to see code that works and then I can go into the references and learn more about the classes and PEMs. This tool enables that. And it has the benefit of enabling me to accomplish the task.

      Just my $0.02. (Hmm. As the host of the show, should my $0.02 be worth more? :)

    • User profile image
      mel

      This works only for C#? [That's what's implied by the bing code search online version...]

    • User profile image
      Yi Wei

      @SuperKoder:
      Showing the code in the addin does not mean that programmers will stop thinking. These are two separate things. Showing a cleaner, adapted-to-your-context piece of code should make your thinking easier.

      Of course in case that you need to learn about the used APIs, you will have to go to proper reference pages (and we provide the source link).

      We are also working on advanced features such as:
      1. verifying the code before suggesting it to the programmers.
      2. allowing you to quickly navigate to API reference pages.

      Again, to help programmers think in an easy way -- not to stop them from thinking.

    • User profile image
      Gordon​Beeming

      @rogreen, in RSA your $0.02 is currently worth R0.22 =P

    • User profile image
      rogreen

      @GordonBeeming: Yes!! That is what I am talking about! :D

    • User profile image
      Jayshu01

      I installed this extension in VS 2013 ultimate (update 1) version and I get this error when I try to invoke the help.

      System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.Editor.InvokePeek.IntellisensePresenterProvider.GetUIElement(CompletionSet itemToRender, ICompletionSession context, UIElementType elementType)
   at Microsoft.VisualStudio.Language.Intellisense.Implementation.Helpers.<>c__DisplayClass2`2.<FindUIElement>b__0(IUIElementProvider`2 provider)
   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy`2 provider, Func`2 getter)

       

       

    • User profile image
      David_Lean

      I installed this a while ago but it doesn't display in the intellisense menu.

      I believe there is an issue with Resharper. It adjusts the focus on the intellisense menu to suggest the most likely option based on what you are doing / have do before.

      Be nice if they could co-exist together.

    • User profile image
      SuperKoder

      @GordonBeemin​g,@Yi Wei. You are feeding them a complete code. Why DEVs need to think to get a solution ? It's out there and you only need to hunt the code. Off course they don't stop thinking but they think to hunt a code. You see beginners should understand and learn code syntax, library reference, proper code usage patterns and many more. If you present them this way, they don't give attention to know what is going on. A problem is solved by hunting a code , why they think about it.

    • User profile image
      dltaylor

      I think you should include this tool for the express editions as well, instead of just the VS Pro version.

       

    • User profile image
      Ed Ferron

      Nice work, this helped a ton on my current project.

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.