4 ms·
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
by cromwellian 7y ago
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 IDEs, especially in refactoring, for Java often appeared to use string comparison. So you'd do a system wide refactor of say interface 'Foobar', and it would match completely different interfaces called 'Foobar' that had no relation to what's under the cursor.
It's this almost 100% exact matching that develops into a rapid muscle memory where you learn to trust the IDE, and non-deterministic algorithms which have say, a 1% failure rate, tend to be annoying.
- vanderZwan 7y agoThat 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
- nickjj 7y ago> 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).
- jasode 7y ago>, 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 https://imgur.com/a/05d9Ij9
- seanmcdirmid 7y agoMost modern autocomplete engines respect camelcase, so N will bring up both Now and UtcNow.
- Dayshine 7y ago> 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. Eh, isn't the whole point that intellicode is trained on your own project? Mine is, it suggests things based on our usage.
- seanmcdirmid 7y agoThat isn’t how code competition is used. It is t about “saving on typing”, rather, it enables exploration and allows a developer to browse on what they can do next. In that case, your error rate is completely meaningless.
- carlmr 7y agoEspecially it's a really good memory assistant if you switch between languages often.
- thomascgalvin 7y agoReally it's both, and IntelliJ is the best in the world at supporting both modes. What you're "probably" going to type is at the top of its autocomplete list, but you can still browse through an alphabetical list of what you "could" type below that.
- deleted 7y ago[deleted]