Slashdot Mirror


Bing Now Provides Exact Snippets of Code for Developers' Queries (searchenginejournal.com)

"Bing has launched a new intelligent search feature which provides the exact piece of code a developer is looking for," writes Search Engine Journal. An anonymous reader quotes their report: The code snippet will appear right on the search results page itself, which means users will not have to skim through long threads and articles to find the one thing they're looking for. Bing calls this new feature a "Code Sample Answer" and says it's designed to help save developers' time. "Many of us are developers too, and we thought: what if Bing were intelligent enough to do this for us? What if it could save users' time by automatically finding the exact piece of code containing the answer to the question? That is how Code Sample Answer was born..."

A Code Sample Answer will trigger only when Bing intelligently detects the coding intent with high confidence. "To achieve this level of precision for query intent detection, Bing's natural language processing pipelines for developers leverages patterns found in training data from developer queries collected over the years containing commonly used terms and text structure typical for coding queries. The system also leverages a multitude of click signals to improve the precision even further"... [I]t also covers other tools used by developers. For example, a Code Sample Answer can be triggered when searching for git commands and their syntax.

Bing extracts "the best matched code samples from popular, authoritative and well moderated sites like Stackoverflow, Github, W3Schools, MSDN, Tutorialpoints, etc. taking into account such aspects as fidelity of API and programming language match, counts of up/down-votes, completeness of the solution and more."

JAXenter.com notes they obtained similar results using the privacy-friendly search engine DuckDuckGo, and ultimately asks whether this functionality could affect the search habits of developers. "Is this new feature enough to make Bing a viable search engine tool for programmers or will Google be the go-to for hunting down source code?"

3 of 84 comments (clear)

  1. Duck Duck Go started this by Jeremiah+Cornelius · · Score: 3, Informative

    They have been returning command syntax for queries like "ffmpeg deinterlace" since last year, at least.
    ffmpeg -i input.vob -vf yadif -c:v libx264 -preset slow -crf 19 -c:a aac -b:a 256k output.mp4

    --
    "Flyin' in just a sweet place,
    Never been known to fail..."
  2. Re:Let me bing up a vrius by Dracolytch · · Score: 3, Informative

    I just checked some quick examples in JavaScript, and didn't love the syntax it gave back as a result. Meanwhile, the StackOverflow pages in the search results provided much more correct answers. StackOverflow's answers often provide context, which is very important when building software.

    --
    This sig has been enciphered with a one-time pad. It could say almost anything.
  3. Re:Let me bing up a vrius by datavirtue · · Score: 4, Informative

    Yeah...anyone who runs a search and employs the first snippet they find is a moron. There is context and the need to make sure you and most everyone else is not doing it wrong. A lot of times you can find an answer on SO but you need to read all the way to the bottom and follow the links to other SO posts and answers to find the best way to handle something. When you don't know what you are doing it is often difficult to judge what is correct.

    TLDR; Cut and paste coding is more involved than just cut and paste.

    --
    I object to power without constructive purpose. --Spock