Live data from Hacker News

Introducing Bing Code Search for C#

blogs.msdn.com

81–90 of 235 posts

Re: Introducing Bing Code Search for C#

#81

It's interesting that the example code shown is so clunky. It uses try-finally to manually dispose the resource when the idiomatic way would be to wrap it in a using block: using (var file2 = new StreamReader(file)) { while ((line = file2.ReadLine()) != null) Console.WriteLine(line); } It's possible this is a badly picked example but it shows one big downside of this -- the lack of discussion about the sample code th…

The url to the original sample is visible on the bottom right. That said, continuing the optimizations and smarts around the code metrics and semantic understanding will be an ongoing effort around the service. But yeah, we still have stuff to improve

Re: Introducing Bing Code Search for C#

#82
post #5

C# and .NET get a bad rap for being created by Microsoft. But one thing that can't be ignored is how polished their development tools are. I absolutely love coding in Visual Studio.

Personally, it's because Microsoft development locks you in, and costs a lot of money. The OS costs money, the server OS costs money, the database costs money, the IDE costs money, everything costs money, and you have to use it, for the life of your app. To many young developers these days, and IIS server is the thing your company keeps in the closet to some sluggish legacy monstrosity which has been replaced for yea…

VS lock in is a very real thing. At my current employer, there is no way they could ever come off of VS and .Net because of the lack of polyglots in the office. There is one of us that does Java, 3 that do PHP (only in the last 6 months), and 6 that are set up for .Net MVC. Management just can't spare the costs to retrain, and none of these guys go home and code on non MS platforms.

Re: Introducing Bing Code Search for C#

#83
post #42

Earlier quoted context omitted.

It pains me if I am honest. Our CMS is built on .NET and it's like an uphill battle selling it as it's on IIS and it's .NET. I have played around with the idea of reworking it into an open source language and open source database but I would miss Visual Studio and the language a lot. I don't get all the hate?

Visual Studio now has Python support. I haven't yet tried it but it might be worth investigating.

I've been using it regularly for a few weeks now. Granted I'm a novice a Python, but so far I've found it to be outstanding. It offers almost all of the VS functionality that you would expect if you were developing in .NET, and it's quite stable.

Re: Introducing Bing Code Search for C#

#84

Earlier quoted context omitted.

I think it's less about not wanting to use Visual Studio and more about not wanting to have a Windows VM thrashing resources. I've worked with teams that have migrated to ServiceStack just to avoid running Windows. Assuming that running Windows is a non-issue, the parts that really, really bug me are: - Background operations suddenly become foreground operations that stall the IDE with a dialog saying "A background o…

- Never had background to foreground stall IDE issue in VS2010 or up - Nor misclicks stall IDE - Nor automatic refactoring analysis stall IDE - Automatic reformatting is a once click option to disable and is not terribly aggressive in VS 2010 up. - wants you to . Not forces. So, by the way, do JetBrains, NetBeans, Oracle ...

Not running into those issues must be really great for you, but does very little to make the experience better for me. I tend to run VS under virtualization with TFS, which is far from a pleasant experience, even on modern hardware.

Re: Introducing Bing Code Search for C#

#85

Earlier quoted context omitted.

Hi, how do you check if the snippet it pulls from stackoverflow works? Static analysis?

I'd guess so. It's pretty easy with roslyn these days.

Roslyn can solve the halting problem and tell me if my program will do what it is supposed to do?

Re: Introducing Bing Code Search for C#

#86

If you want more info about the extension let us know. There's alot of cool contextual and semantic pieces in there that makes it a smarter search

I'm wondering if there is a risk of being shown code snippets that represent "Do NOT do the following: ..."? Otherwise, really cool project!

We try and avoid those cases, but it's possible yes. The semantic and contextual approach help you find relevant samples and discussions that are highly relevant to your code, you still have to vet whether the sample makes sense. (Visiting the original sample page is likely to shed more light on those cases where we mis-label)

Re: Introducing Bing Code Search for C#

#87

Earlier quoted context omitted.

Personally, it's because Microsoft development locks you in, and costs a lot of money. The OS costs money, the server OS costs money, the database costs money, the IDE costs money, everything costs money, and you have to use it, for the life of your app. To many young developers these days, and IIS server is the thing your company keeps in the closet to some sluggish legacy monstrosity which has been replaced for yea…

Moreover, their business unit's licensing/pricing team are chasing your code forever to suck more margins from its use. While developing with MS technologies, you must accompany any code, tests and documentation with a "My License" folder with "licensing.cs" files to calculate, the implied licensing costs of each piece of code you develop along with all required MS components down to the metal. Finally, you must make…

This is satire. Calm down.

Re: Introducing Bing Code Search for C#

#88

Earlier quoted context omitted.

It pains me if I am honest. Our CMS is built on .NET and it's like an uphill battle selling it as it's on IIS and it's .NET. I have played around with the idea of reworking it into an open source language and open source database but I would miss Visual Studio and the language a lot. I don't get all the hate?

I think it's less about not wanting to use Visual Studio and more about not wanting to have a Windows VM thrashing resources. I've worked with teams that have migrated to ServiceStack just to avoid running Windows. Assuming that running Windows is a non-issue, the parts that really, really bug me are: - Background operations suddenly become foreground operations that stall the IDE with a dialog saying "A background o…

I believe you have an install issue.

Re: Introducing Bing Code Search for C#

#89
post #82

Earlier quoted context omitted.

Personally, it's because Microsoft development locks you in, and costs a lot of money. The OS costs money, the server OS costs money, the database costs money, the IDE costs money, everything costs money, and you have to use it, for the life of your app. To many young developers these days, and IIS server is the thing your company keeps in the closet to some sluggish legacy monstrosity which has been replaced for yea…

VS lock in is a very real thing. At my current employer, there is no way they could ever come off of VS and .Net because of the lack of polyglots in the office. There is one of us that does Java, 3 that do PHP (only in the last 6 months), and 6 that are set up for .Net MVC. Management just can't spare the costs to retrain, and none of these guys go home and code on non MS platforms.

That's not what people call lock-in. Then there's Javascript+Sublime lock-in, OCAML lock-in, Emacs lock-in...

Re: Introducing Bing Code Search for C#

#90
post #24

What a co-incidence! Fred Wilson posted on this very topic this morning. http://www.avc.com/a_vc/2014/02/inspired-by-github.html From his post: "I was at a hackathon up at Columbia University last weekend and one of the hacks was a development environment that automatically queried StackOverflow and GitHub as you are writing code so that you always have in front of you the answers to the questions you are most likely…

A core difference here is the contextual and semantic understanding of the code. The way we search and rank ties into alot of coding metrics and semantic parsing of the code around the web using the new 'Roslyn' C#/VB compiler-as-a-service technology.

Most other experiences base their search algorithms on search engines / textual matching / rely on the host web site's search accuracy, where as we combine search engine smarts with semantic and contextual analysis.

Post reply on HN