Unkind thought
To adapt the famous words of Jamie Zawinski:
You have a coding problem.
You decide to Bing it.
Now you have two problems.
Microsoft has released the production version of Bing Developer Assistant for Visual Studio, which has been in preview since August 2014. Bing Developer Assistant The developer workflow today often looks like this: write some code, hit problem, Google for answer, continue. Software platform creators are still in love with …
Amazingly, you can have visual studio and a browser on screen at the same time in Windows 8 too. I have right now on this work machine, for example.
On topic - most of this looks to merely a widget to save time typing search criteria but the "right-click a compile error" actually looks handy enough for me to install this and try it out.
If comments are still open at the end of the week when I've given it a bit of a live test, I'll reply here with an opinion on whether it's any use.
It does put snippets on there from StackOverflow. It also searches the project that is currently open, some other projects on your hard disk (not sure what logic it uses to determine these), MSDN docs and other places.
Been using it for a while and can recommend it. While it's only 1 step away from searching for the issue directly, it's 1 step that you don't need to take as often anymore!
Interestingly, Stackoverflow's original mission statement was expressed in terms of its own placing in Google search results. Nobody mentioned Bing.
But these things can change, and to give Microsoft credit... they never stop trying.
Perhaps the scariest thing about this feature is that it got the green light from Microsoft's management to develop in the first place. Is Visual Studio really so good that this kind of inane crap is all that is left to add? Er, "no, not even close" would, I suspect, be the answer from just about everyone who has to use VS.
I suspect the answer is "because this is an eyecatching feature that's trivially easy to develop".
To say that VS devs absolutely must work through everything in their backlog in strict priority order - is just plain dumb. If your software has (a) a critical bug that affects 10% of users and will take six months to resolve, and (b) a feature request that will please 80% of users and take a week to provide, which are you going to do first?
If you answered (a), then you're crazy. You need revenue to keep you going through those six months, and you're not going to get it by putting your head down and doing what, from your customers' and competitors' perspectives, is indistinguishable from "nothing".
"if the IDE should encourage best practice, perhaps the current approach is misconceived"
It's pretty rare that the answer to any real problem that I've had comes from just taking the first answer and pasting it into a program. Usually, I need to read several sources to get the context of the problem and then come up with a variation on it with my own solution.
As for Stack Exchange/Overflow, I often see the wrong answer promoted to the top because someone is repeating something which is popular, but either out of date or not appropriate to the question at hand, or simply wrong. Another problem is that the moderators often won't allow answers which say that the person is asking the wrong question and they need to take a different approach to the broader problem. Instead you are supposed to focus on just that narrow problem rather than offer genuine guidance when someone has gone off the track.
And as to Microsoft's own web based documentation, don't get me started on that. I can't comment on their C# stuff, but their C documentation is abysmal compared to pretty much every other source out there. I'm working on a cross platform C library, so I've had a very good exposure to how their documentation compares to those of other C compilers.
Can someone please develop a system that spots such code and nukes it? (as a bonus the 'programmer' too).
I've had to unpick quite a bit of it over the years. It always seems to be a mess, contains functions/data that are never accessed, and fails to properly validate I/O.
Oh, and it usually has questionable provenance/legality.
"Maybe if they made decent and accurate documentation you wouldn't need to use a search engine all the time?"
This... first, I do want to say I actually like the idea of what they are doing here. When you do have to look for some sample code, it would indeed be nicer to have it in the IDE than having to switch between IDE and browser.
That said.... Switching back and forth between Linux, Windows, and Android programming...
The typical libraries on a Linux system (GTK, SDL, C library, X, XML lib if you're doing that, and so on) have reasonably good documentation, and usually code snippets that actually follow recommended programming practices. There's generally one particular library (with a fairly stable API over the course of a decade or more) to get any particular job done (although other libs may exist, they won't be installed by default, and it'll be pretty clear looking online which lib to use if your goal is to program for a "stock" system.) There still *is* Google pulling up snippets on stackoverflow etc. if you need it, but you may actually not need it.
Android, the whole API is there; not good code samples but honestly most of the API is quite straightforward -- including what API version a given call was introduced, if it was deprecated and if so what API version it was deprecated (and there's a table mapping API version to version of Android.) There's a chance that you may not have to google anything. I wrote one app without googling a thing, and a second app I only had to look up something (undocumented) on handling the status bar.
Windows? There's certainly extensive docs, but the APIs (for most functions) seem overcomplicated, no indication of what the recommended way is to use these APIs, and usually mutliple APIs with no indication on even *which* API to use (sometimes Microsoft deprecates one, but programmers find the replacement inadequate and say "don't use the replacement, use the deprecated one"). Sometimes, Microsoft has just left docs online, no header or footer to indicate "this is no longer up to date", I'll be reading up on something just to realize "Hey, this is from 2008, and this API has already been replaced twice since then." And, there'll be a high-level API that covers like 90% of functionality, then you've got to dig down to a lower-level API to do the rest -- not for unusual actions but for actions that every user of the APi wants to perform. In a few cases, I find they reimplemented some functionality (usually fixing bugs and speeding it up) but, despite the same functionality (or a superset of the old functionality), same inputs, and same outputs, the API calls will all be different (I think because they just had someone write the new API from scratch and it simply didn't occur to them to make it compatible with the old one.) It's honestly confusing as all hell. And, unfortunately, I've found plenty of code on stackoverflow, etc., that although it may have worked, appeared even at a glance to be quite fragile (for example, a snippet to print a temporary PDF file that would pause 1 second and just *assume* the print job had finished (deleting the temp file), instead of actually CHECKING if the print job had finished first.)