Live data from Hacker News

Autocomplete as an Interface (2015)

benkuhn.net

81–90 of 197 posts

Re: Autocomplete as an Interface (2015)

#81

> Instead, for most people the killer feature of zsh is that it doesn’t re-output the prompt when you autocomplete Actually, this, coupled with the "complete on first tab hit" is the reason I stayed away from zsh. I tried it a few times, simply because so many people are raving about how much better it is than bash, but never really switched and the autocomplete is one of the major reasons. 1. I like to see autocompl…

> I like to see autocomplete as a history

Not sure if I understand correctly:

Ctrl-r shows command history, filtered by fzf as you type

I find that particularly useful for frequent stuff that I don't bother to put in a script. Optionally add some search keywords in a trailing comment.

(might be not zsh itself, but oh-my-zsh or so)

Re: Autocomplete as an Interface (2015)

#82
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…

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…

> No one would design an autocomplete for written language

Er... that happens all the time: various word processors, text messaging, etc. Even Google's autocomplete (which is a rare example of autocomplete being really good) is essentially this.

Re: Autocomplete as an Interface (2015)

#83
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…

VB6 had a feature where if you typed a previously defined name with the incorrect case it would autocorrect it for you. I used to type my identifiers with purposely incorrect casing so that the autoformatter would confirm that I had selected the correct variable or method name. I really liked that feedback.

Not that I'm saying that was a great workflow. But I liked the subtle feedback as I typed. I've also used autocompleters in the fashion you describe. Syntax highlighting can also provide this kind of feedback and I feel like these tools could probably morph into a single, more cohesive tool that provides a smoother experience than the pop-up window.

Re: Autocomplete as an Interface (2015)

#84
post #35

Earlier quoted context omitted.

I'm a bit confused - isn't autocomplete utterly benign if you don't use it? Using Visual Studio I've never had to autocomplete unless I wanted to, so I've lost no time by having it on if I just want to trudge through, but there's plenty of times I can auto-complete away whole expressions by typing a letter or two and then hitting tab. Regarding nightmarish Java type names I'd rather the name for things be the fully w…

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…

I personally see your first two arguments the exact opposite way.

The visual display functions a bit like subtitles on TV: I don't really notice it's there, until it can help me. Just like subtitles help when I don't immediately understand something, autocomplete helps when typing something takes a bit longer than I'd like it to or when I'm not entirely sure what I want to write.

The "misuse" of autocomplete always continues to affect my workflow, because I can never ignore it. When it's wrong I have to explicitly opt-out from having it do the wrong thing, instead of quickly opting in to the right thing when it makes sense. It's a lot like auto-correct on phones, correcting words that weren't wrong in the first place. The fact that the popups capture arrow keys makes this effect significantly worse.

After some configuration I now have Emacs set up to handle this perfectly. Enter and movement commands always work like they normally do, never depending on the state of the autocomplete popup. Whenever it's there I can quickly make use of the autocomplete popup using Alt. It never does the wrong thing, because I would have to consciously tell it to do the wrong thing. When it's opt-in, autocomplete for regular English is actually a delight. I notice myself quickly auto-completing long words that take longer to type out.

I fully agree with your third argument. In my experience libraries and language ecosystems that fully expect autocomplete, like Java, tend to become overly verbose. The length of a name or expression affects the reading cost, but autocomplete mostly removes the equivalent writing cost. This then allows programmers to quickly give up on finding better names, or clearer ways of doing things.

Re: Autocomplete as an Interface (2015)

#86

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…

> No one would design an autocomplete for written language Er... that happens all the time: various word processors, text messaging, etc. Even Google's autocomplete (which is a rare example of autocomplete being really good) is essentially this.

Ya, I should have written it differently. These aren’t the same things, really. One is about discoverability and the other is about handling input method deficiency. I remember auto completion being really great when using T9 to text on old Nokia handsets, but not because I didn’t know what words I could write.

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)

#87
Autocomplete, IMO is a crude effort to make text based interfaces more interactive.

While it does address some shortcomings of text based interfaces, text based interfaces are inherently flawed to provide enough feedback or context to the user. The only reason we are still using text based interfaces is that the computing system has revolved around UNIX and the command line.

The fact that autocomplete is needed for sanely using text based interfaces (especially the command line and programming languages) are proving that we need a better interface.

GUIs became popular due to providing the users instant feedback of what the user can and cannot do, providing context implicitly with the user interface elements. Autocomplete's corresponding features are flag/function name completion, context (like the current directory) based completion... but they really don't do their job well.

I do not have any ideas about what the interfaces of the future will be... but text based interfaces won't be the future. Hence autocomplete might become obsolete...

Re: Autocomplete as an Interface (2015)

#88
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 prefer autocomplete to only appear when I ask for it. Often that is ctrl+space. It's a good compromise between the two extremes.

Re: Autocomplete as an Interface (2015)

#89
post #81

> Instead, for most people the killer feature of zsh is that it doesn’t re-output the prompt when you autocomplete Actually, this, coupled with the "complete on first tab hit" is the reason I stayed away from zsh. I tried it a few times, simply because so many people are raving about how much better it is than bash, but never really switched and the autocomplete is one of the major reasons. 1. I like to see autocompl…

> I like to see autocomplete as a history Not sure if I understand correctly: Ctrl-r shows command history, filtered by fzf as you type I find that particularly useful for frequent stuff that I don't bother to put in a script. Optionally add some search keywords in a trailing comment. (might be not zsh itself, but oh-my-zsh or so)

If you press tab twice in bash, it will display a list of completions and then another prompt below. If you hit tab again, it will generate another list of completions and another prompt. You should be able to still see the previous list of completions above. Zsh reuses the prompt and redraws the completion list, so once I hit tab, I cannot see what my previous completion list looked like.

Re: Autocomplete as an Interface (2015)

#90
post #76
post #21

Earlier quoted context omitted.

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...)

I agree that there are plenty of shells which make it easier to write completion scripts (even I've written one which would fall into that category) and there are plenty of shells and 3rd party libraries which provide a nice UI/UX for autocompletion than readline does.

...however Bash can still do the items you'd described earlier. In fact back when Bash was my primary shell (which is a few years ago now), it literally did do those things you described and it came already pre-written as part of whatever Linux package I was using. ie I didn't have to write those scripts myself.

But yes, I do agree Bash is pretty horrible at writing and using autocompletion compared to more recent shells. There no doubt about that :)

Post reply on HN