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?"
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?"
Mueller's search is the best search engine in America. #Traitorfinder
It won't be long before stuff like fork bombs and data deleters get "suggested" for common programming queries.
Way to make Google the default search engine. å"¦ ly thing it's used for
Let me guess: it's always C# ?
Every time, I'm shocked that Bing still exists.
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..."
"give me that piece of code that you use to generate code"
Slashdot, fix the reply notifications... You won't get away with it...
Young coders are so bad because they just copy code snippets and pass them off as their own work.
No wonder security is so bad - they just keep copying the bad code over and over.
...will just accept questions and fill in the necessary code?
Now I can forward more stuff to look smart!
but feel like a schmuck when I do[1]. I don't use ggl by default, but bing[2]. When the shit has hit the fan though I put g...com in the box up there because, well, because it's the last resort and dealing with it is like taking one in the nuts, for the team[3].
[1] rarely finds what I am looking for
[2] bing since it won't mutilate me (spindle, probably)
[3] better to get it in the nuts and find what I am looking for than to walk away and not
Have probably already ruined the internet. The President and politics have no purpose for being mentioned in this thread.
I guess one good side effect of the election of Donald Trump has shown the importance to significantly increase spending on mental healthcare.
Bing extracts "the best matched code samples from popular, authoritative and well moderated sites like Stackoverflow
If it got popular enough, this would impact the number of upvotes. And the whole idea of StackOverflow is that upvotes determine a working answer.
8 of 13 people found this answer helpful. Did you?
Just tried three of the most basic code questions I could think of, wrong answers every time:
// 'a' would be 0 if you did the latter
"C++ opengl draw triangle" returned:
float c = -1.0 + 2.0*desiredPixel/pixelWidth
"C++ opengl set vertex shader" returned:
// (Vertex buffer must be bound at this point)
glEnableVertexAttribArray( a );
glVertexAttribPointer( a, 3, GL_FLOAT, GL_FALSE, sizeof( your vertex ), nullptr );
"C++ directx 11 create 3d texture" returned:
desc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
ComPtr<ID3D11Texture2D> tex;
HRESULT hr = mDevice->CreateTexture2D( &desc, &initData, tex.GetAddressOf() );
if (SUCCEEDED(hr)) {
D3D11_SHADER_RESOURCE_VIEW_DESC SRVDesc = {};...
Nope, nope, nope...
Code samples are pretty much always "not for proudction".
It's good that samples are easily available, as code often explains a concept better than documentation for many developers.
The risk is that these samples are just copied in to an application with all the codesmells that it contains.
Doesnt stack have a new copyright in place?
[($)]
It will allow some "developers" that have no clue what they are doing to fly under the radar for some more time and do more damage. And that is basically the only thing this will do.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
So they're stealing page hits and ad impressions of the sites providing this code. Google does the same thing when you ask it questions - they show what they believe to be the answer, with a link to the source...which you'll probably never click through to, because you've already gotten your answer.
I can't help but think that this feature has more to do with the recent acquisition of GitHub than we know. Seems like Microsoft has started using your code to power its search engine and monetize your code. What about copyrights? Does it respect terms outlined in projects licences?
I'm, going to buy a workstation with 1TB of RAM and search in Bing "Windows implementation, course work". I hope this will bring an example of a working Windows source code and the browser won't crash.
and since bing is from microsoft, the code already has memory leaks, security holes, and thousands of patch & unpatched bugs that microsoft calls "features"
It's been on DuckDuckGo for quite some time. Often quite useful.
just change that stupid name already!
id say thats 95% of reason why i dont use the stupid thing. the rest is the shitty search that dont find anything
Example, or explanatory, code very frequently comes with a note such as "data validation and error handled omitted for clarity". They aren't kidding - important code is left out in order to leave bare only what's being demonstrated. Putting such code online without proper validation and error handling is putting a glaring security hole in place.
I wrote a snippet of demo code years ago which was put into production on hundreds of thousands of web sites, though it should not have been. I demonstrated an idea with some code, which wasn't supposed to be production ready. A popular site copy-pasted it from my site, and others copy-pasted it from there. It ended up on Stack overflow repeatedly and other places as copy-pasted code that many, many people used in production. It was not secure.
Without checking, I would bet that Bing is serving up my code when someone searches how to do that, because it's on many well-known sites. It's not secure, production-ready code, though. It's demonstration code illustrating a certain technique.
So..... no copyright infrigements... yet?
And now we know there was more behind the github purchase. They are still trying to make Bing relevant to someone, or something.
I don't see an upside or any side at all. Google has long provided us with a search engine.
If you have a question, Google will find that question or a similar one on the web. If you enter an answer, such as 'yes' or 'no', Google will find the answer and maybe a question too.