Live data from Hacker News

Autocomplete as an Interface (2015)

benkuhn.net

71–80 of 197 posts

Re: Autocomplete as an Interface (2015)

#71
post #69

Earlier quoted context omitted.

No one would design an autocomplete for written language because we remember the words we are going to use, and anyways, if we forget them, there is no hierarchical namespace to browse and navigate. What autocomplete has enabled are deep and broad namespaces in programming languages that do support such a concept. Yes, you are definitely correct that the massive namespaces designed today are only possible because of…

Perhaps not hierarchical namespaces, but there is the knowledge that 'next word must be a verb', 'that verb requires an object', etc.

There is, but the space is vast for those. A better analogy might be a possessive, like the King’s crown, or perhaps an operation, the president’s impeachment. But we usually use language to communicate, not to design and build, so you aren’t gaining much when you already know what was done or to be done and are just communicating that. Instead, think of auto completion as a planning aide to help you remember what things have and can do.

The right word for that would be code completion or more specific brandings of intellisense, which is completely different from things like T9.

Re: Autocomplete as an Interface (2015)

#72
post #40
post #20

You know, I realize I'm the weird one here, but: when writing code, I almost always turn off autocomplete. Sometimes you basically have to have it on (when the language is demands it) but I usually turn it off. It's too much visual noise, too distracting. It's a thing that pops up that demands your attention. If I want to type if (myVector->empty()) { fillVector(myVector); } autocomplete will pop up a window like 4 t…

I used to think this way, too, so I don’t think you’re weird. At my old workplace, everyone else was a Java IDE wizard, and I was used to good old-fashioned text editors. Aren’t you distracted by that widget appearing while you’re typing, I thought? Is it really faster for you to hit the Down arrow three times instead of just typing ‘empty’? Do people not learn the libraries they’re using anymore‽ But over time, some…

It sounds like you're using autocomplete as a substitute for a tool you'd like, but doesn't exist.

Re: Autocomplete as an Interface (2015)

#73
post #59
post #8

You should probably try TabNine ('autocompletion with deep learning'). It is trained on a compendium of pre-existing code, and suggests really sophisticated completions. Sometimes it freaks me out how it suggests solutions, almost like having somebody code for me.

Are the completions legally owned by you the user? Or are they provided under license?

The license only refers to the software, for what I understand, and doesn't say anything about the outputs. The completion runs on your machine unless you explicitly set up a cloud account. They explicitly explain how you can make sure your code never reaches their servers if you don't want it to. Even if they suddenly claimed IP on your code, I really don't see how that could be held up in court.

Re: Autocomplete as an Interface (2015)

#75
post #20

You know, I realize I'm the weird one here, but: when writing code, I almost always turn off autocomplete. Sometimes you basically have to have it on (when the language is demands it) but I usually turn it off. It's too much visual noise, too distracting. It's a thing that pops up that demands your attention. If I want to type if (myVector->empty()) { fillVector(myVector); } autocomplete will pop up a window like 4 t…

Not all auto completions are equal, I suspect you've only dealt with bad ones.

It's very tricky to get right and requires a lot of attention to detail in timings, human attention span, UX, and even psychology.

IDEA's auto completion is mostly good, in my experience, not sure if you've tried it.

> i can type "empty()" on the keyboard faster than I can look at a screen and choose "empty()" from a list,

Sure, but that's a five letter word with no camel case nor special symbols. Your observation stops applying very quickly as the code base grows.

Not mentioning that having to type all these letters and symbols (especially if you need to use the shift key) is pretty bad from a carpal tunnel standpoint.

Re: Autocomplete as an Interface (2015)

#76
post #21
post #11

Earlier quoted context omitted.

Yep. Also the fact that it can complete in more places. Git history, remote hosts for ssh, ...

In fairness Bash can do that as well. It's not a shell specific thing, autocompletion is just a shell script after all, the issue is whether someone has written those scripts (which they have for Bash) and if your package manager ships them (which some do but others do not). However I do agree that Bash generally feels outdated these days. In fact autocompletion was the primary reason behind me writing my own readlin…

In my experience, this is partly true but in general it’s hard to get it to work well and in the end zsh is more slick. Xonsh is another shell that also has better completion than bash and with even less effort. (It’s not as stable though...)

Re: Autocomplete as an Interface (2015)

#77
post #72
post #40

Earlier quoted context omitted.

I used to think this way, too, so I don’t think you’re weird. At my old workplace, everyone else was a Java IDE wizard, and I was used to good old-fashioned text editors. Aren’t you distracted by that widget appearing while you’re typing, I thought? Is it really faster for you to hit the Down arrow three times instead of just typing ‘empty’? Do people not learn the libraries they’re using anymore‽ But over time, some…

It sounds like you're using autocomplete as a substitute for a tool you'd like, but doesn't exist.

Ok, I'm curious! What might such a tool look like or do? Did you have something specific in mind?

Re: Autocomplete as an Interface (2015)

#78
C got this right. We tend to resort to textual interfaces (CLIs and source code, searching instead of directories) because they have the expressivity and conciseness of language. No other tool such as Diagram languages works as good. As devs , our tools are keyboards and our eyes. The measurable goal is to reduce the time it takes to type and read code. Autocomplete makes code too verbose, keyboard makes it too cryptic. I tend to err towards brevoty, as i think it s important to be able to read code in large chunks fast. As such i think autocomplete is mostly annoying as it gets in the way. Languages should instead be laconic even if that means a little memorizing. I think C or python get the balance right and that should have a measurable productivity benefit

Re: Autocomplete as an Interface (2015)

#79
post #45
post #35

Earlier quoted context omitted.

I'd argue that it's not benign. I think there are very real costs. First off all, "misuse" of autocomplete can be very annoying. Some autocomplete system autocompletes when you press tab, some when you press enter. Many times I've been typing a thing, finished the line with the autocomplete window still open, pressed enter to go to the next line, and instead have auto-complete enter a bunch of stuff I don't want. The…

Re: editor trying to be helpful but getting in the way Sublime Text often inserts "matching" quotes and parentheses. But it doesn't always do the right thing, so I usually have to go back and erase it. But then it erases the original one, too. So I have to move the cursor, add a space, and then erase it. And when the feature does do what I wanted, it's only saving me literally 1 character --- ~0.1 seconds at my typin…

I really have problems with Sublime Text's autocomplete, to such an extent that I can't quite be sure whether it's a net gain or loss. If I was sure either way, it wouldn't be a problem, of course — I'm pretty sure it's easy to turn off altogether, if that's what you want.

A common example is copying some PHP source code into a new file, then entering "Many other similar examples (quote characters often seem to cause a problem). But, on the other hand, I know I've made use of autocomplete to help me type a long constant name which happened to be in the same file. So ... swings and roundabouts.

Re: Autocomplete as an Interface (2015)

#80
post #72
post #40

Earlier quoted context omitted.

I used to think this way, too, so I don’t think you’re weird. At my old workplace, everyone else was a Java IDE wizard, and I was used to good old-fashioned text editors. Aren’t you distracted by that widget appearing while you’re typing, I thought? Is it really faster for you to hit the Down arrow three times instead of just typing ‘empty’? Do people not learn the libraries they’re using anymore‽ But over time, some…

It sounds like you're using autocomplete as a substitute for a tool you'd like, but doesn't exist.

Yes: what I really want is an autocomplete wired directly into my brain. Then I just have to intend to start working and my code writes itself, without having to lift a finger.
Post reply on HN