Live data from Hacker News

Visual Studio IntelliCode

dirkstrauss.com

21–30 of 49 posts

Re: Visual Studio IntelliCode

#21
post #8

I appreciate all attempts at improving this kind of auto suggesting but for me simple buffer based string completion is still vastly superior to anything VSCode offers out of the box (I work as a front end dev). Way too often VSCode suggets methods and snippets that are totally irrelevant while ignoring a string that's just a few lines await. So far no configuration settings helped with that. So bottom line vim's bui…

I like Lazarus' approach where it tries its best to provide you intelligent completion but if that fails it also does token/keyword/identifier based completion from what it can find in all open files and remembers from previously open files.

And it always, always, ALWAYS puts any word it knows/guesses that starts with the characters i type at the front before making any other suggestion.

And all that in interactive practically instant speeds. How the hell Visual Studio takes ages (ie. often several seconds) to complete a word i already typed a few moments ago on a 4.2GHz 7700K machine with 32GB of RAM whereas Lazarus happily completes words even on a puny Raspberry Pi, i don't know.

Anyone who writes IDEs should work for at least 6 months with Lazarus to understand how to do things right and if their IDE still provides a worse editing experience (i'm not expecting the entire WYSIWYG GUI and object design as this isn't really something everyone cares about, although it'd be nice) after that then they are doing something very wrong. I have issues with Lazarus with the overall UX being very messy, but the editing experience is the best i've seen.

Re: Visual Studio IntelliCode

#22
post #8

I appreciate all attempts at improving this kind of auto suggesting but for me simple buffer based string completion is still vastly superior to anything VSCode offers out of the box (I work as a front end dev). Way too often VSCode suggets methods and snippets that are totally irrelevant while ignoring a string that's just a few lines await. So far no configuration settings helped with that. So bottom line vim's bui…

If you're using Intellicode in Visual Studio with C#, I'm afraid I don't really believe you. Intellicode strongly prioritises nearby code elements. Could you give an example of a situation where it's completely missing the point? VS Code's default completion is strictly buffer based, so no sure what you mean there either.

I have a bunch of screenshots I shared in our work slack channel. First of all I am talking about Visual Studio Code rather than Visual Studio. I should have mentioned that, sorry. Intellicode is also available for VSC so I figured it would be relevant here.

The screenshot I posted a while back showed me exporting something at the of the file and I had typed `Det` at which point it suggested some random functions from random APIs. Then I had `Detail` at which point no suggestions were offered. At `Detaile` it finally gave me `DetailedProgress` from the same file about 50 lines higher up.

This is a frequently recurring theme that it takes so long to actually suggest mere names (~ strings).

Re: Visual Studio IntelliCode

#23

This is just an ad for dirkstrauss' website. uBlock origin blocks 34 ads.

I clicked away as soon as this site asked for permission to send notifications.

I haven nothing against content marketing, but please don't ruin the reading experience.

Re: Visual Studio IntelliCode

#24
post #18

Earlier quoted context omitted.

If suggestions are to be made i'd rather have them be made by the designers of the APIs/languages, especially those are have been around for some time and have developed better approaches for doing things already possible previously but in a worse way. For example imagine you have an API that Foos Stuff, the initial version could have been FooStuff but it turned out that after 10 years of active use, the approach was…

Isn't that what the Obsolete attribute is for? Or similar attribute/test driven enforcement of migration to new approaches. It mines your own codebase, not public ones.

As far as I’m aware (caveat: my knowledge may be slightly out of date here), none of the older .NET async patterns - APM, event based async - have been marked obsolete despite the task based versions being preferable for a long time.

Re: Visual Studio IntelliCode

#25

I've never seen any IDE as good as IntelliJ IDEA when it comes to Auto suggest, and it has no real AI, just deterministic understanding of the project's source tree and dependencies, an indexed AST, how the type system works, and what's in scope at the cursor. In other words, two classes both called 'List' should not show up when I start typing 'List', if only one of them can possibly be relevant in context. A lot of…

That sounds kind of comparable to one of the reasons why gesture interfaces (the waving-your-hands-in-the-air type) have such a hard time catching on: no haptic feedback and not a reliable enough success rate compared to real buttons, or even touchscreens. It doesn't matter if it's 99.9% accurate, it's the 0.1% failure rate that will prevent adoption.

Reliability and predictability matters a lot in interface design

Re: Visual Studio IntelliCode

#26

This feature also exists in Visual Studio 2019 and I actually like it. The UI is unobtrusive and the suggestions are very often correct in my fairly extensive experience with it. All the negativity seems to be forgetting that this isn't removing anything, only augmenting an existing feature. Additionally I can see this being very useful to new developers who are less familiar with the language and what can or should…

> very useful to new developers who are less familiar with the language

Yes. It almost serves as a pop-up mini-manual, e.g. for all of the valid methods on a class instance whose name you have just have typed. Good for validation but also discovery.

Re: Visual Studio IntelliCode

#29

I've never seen any IDE as good as IntelliJ IDEA when it comes to Auto suggest, and it has no real AI, just deterministic understanding of the project's source tree and dependencies, an indexed AST, how the type system works, and what's in scope at the cursor. In other words, two classes both called 'List' should not show up when I start typing 'List', if only one of them can possibly be relevant in context. A lot of…

That sounds kind of comparable to one of the reasons why gesture interfaces (the waving-your-hands-in-the-air type) have such a hard time catching on: no haptic feedback and not a reliable enough success rate compared to real buttons, or even touchscreens. It doesn't matter if it's 99.9% accurate, it's the 0.1% failure rate that will prevent adoption. Reliability and predictability matters a lot in interface design

> It doesn't matter if it's 99.9% accurate, it's the 0.1% failure rate that will prevent adoption.

Perfectly said. I've always thought the same way. Basically, I'd rather not use a "pretty good" auto complete, because "pretty good" usually means it does more harm than good (where harm is providing wrong results or doing anything that slows me down overall).

Re: Visual Studio IntelliCode

#30

I've never seen any IDE as good as IntelliJ IDEA when it comes to Auto suggest, and it has no real AI, just deterministic understanding of the project's source tree and dependencies, an indexed AST, how the type system works, and what's in scope at the cursor. In other words, two classes both called 'List' should not show up when I start typing 'List', if only one of them can possibly be relevant in context. A lot of…

>, and it has no real AI, just deterministic understanding of the project's source tree and dependencies, an indexed AST

Right, but because VS Intellicode does not purely work on just the AST tree, that becomes its differentiated advantage. It's not a better way of autocomplete, but a different way that works for some scenarios. Because Intellicode is not deterministic, it is not meant to build muscle-memory like vim, emacs, etc.

I also see some comments in this thread wondering how it compares to Resharper so here's how I'd differentiate them:

Most of the previous autocomplete, "intellisense" type of algorithms work on parsing the AST of the project's source code. The lookup database is therefore scoped to the internal world of that project. Intellicode parses others' source code (e.g. top Github repos) which is out there in the external world.

What Intellicode does is use crowd-sourced data to create a different set of autocomplete suggestions. With that strategy, when one types the dot character "." to trigger a context menu for autocompletion, it's sort of a miniature "pagerank" of the most likely methods or properties instead of a "dumb" alphabetical order.

A concrete example in C# might be the autocomplete of a DateTime type. There are 2 similar properties: ".Now" and ".UtcNow".

What people probably want in many situations to avoid DST bugs is ".UtcNow" instead of ".Now". But in a regular IDE, a dumb alphabetical order means "N" shows up before "U".[0]. Therefore, newbies inadvertently end up with "DateTime.Now" in their code instead of "DateTime.UtcNow".

Something like Intellicode would use machine learning that analyzes the top Github repos and therefore reorder things so ".UtcNow" is higher than ".Now". Of course, this re-ordering could have been manually curated by C# experts into a "best practices database" but Intellicode's idea was to approximate that by using AI applied to others' source code.

[0] VS2017 screenshot example: https://imgur.com/a/05d9Ij9

Post reply on HN