According to a report from TechCrunch, Microsoft has partnered with the programming community website HackerRank to bring code snippets into Bing’s search results.
TechCrunch says the partnership makes it possible not only to locate code quickly via search, but also edit and execute code right from the search results page.
Search for something like “string concat C#” or a similar question and Bing will pop up the editor for you. Using the widget, you can also switch to other languages as well. Depending on the algorithm you’re looking for, the options here include C, C++, C#, Python, PHP, and Java.
HackerRanker co-founder Vivek Ravisankar told TechCrunch that Bing search results will return more than 80 code snippets based on the most commonly searched terms. Marcelo De Barros, Bing’s group engineering manager for UX features and shared tools, also spoke to TechCrunch, calling the new search feature a “Rosetta-stone model for programming languages.”
“In addition to learning how a certain algorithm/code is written in a given language, users will also be able to check how the same solution is constructed in a range of other programming languages too,” said De Barros.
Here’s an image from the TechCrunch story showing how the code snippet works: