News

Visual Studio 2013 Add-In Allows Code Searching Across Web

With Bing Code Search, Visual Studio developers get context-aware search capabilities from within IntelliSense.

Microsoft is doing its best to keep developers in Visual Studio at all times. For instance, a JSON debugger was added to Visual Studio 2103 Update 2, and Windows Embedded Compact 2013 integration with Visual Studio 2013 is coming this spring. Now, add Bing Code Search to that list.

Bing Code Search, a collaboration with numerous partners, including (of course) Bing, Microsoft Research, the Visual Studio team and StackOverflow, allows developers to search for code snippets within Visual Studio itself, instead of leaving the IDE and performing a typical browser-based search. The free add-in to Visual Studio simplifies the process of searching for reusable code across the Web, including sites like MSDN, StackOverflow, CSharp411 and Dotnetperls. Microsoft Research has even produced a video on how to use the add-in.

The add-in does more than just finding C# code snippets, though, as this TechNet blog post explains: "The add-in automatically adapts the snippets to match the developer's context, making the suggested snippets easier to understand and better prepared for reuse."

Bing Code Search can be launched directly from IntelliSense. It adds a new item at the top of the IntelliSense window, asking "How do I..." At that point, according to a Visual Studio team blog entry, it's a matter of typing in the task for which you're seeking code (the example in the blog is "read a file line by line"). After pressing Enter, Bing retrieves relevant code samples, using contextual information like project type and semantics to give the best results.

The results show up around the code, along with Microsoft's best guesses as to which samples are the highest quality and most likely to help.

Currently, the add-in is limited to C# samples and Visual Studio 2013, but Microsoft said it's looking for ways to broaden Bing Code Search's functionality for more languages (a number of comments on the download page pleaded for a Visual Basic version, for example. Additionally, reports are indicating that it's conflicting with the popular third-party product ReSharper).

Those limitations don't seem to be dampening enthusiasm for the product, though. The TechNet blog said that even though it's brand new, 40,000 searches per day were being made by developers worldwide. Initial studies have shown that it's about 60 percent faster, on average, than searching without the add-in.

About the Author

Keith Ward is the editor in chief of Virtualization & Cloud Review. Follow him on Twitter @VirtReviewKeith.

comments powered by Disqus

Featured

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events