Live data from Hacker News

Rules for Autocomplete

jeremymikkola.com

101–110 of 151 posts

Re: Rules for Autocomplete

#101
post #97

Here's two autocomplete mistakes that really irritate me: - Autocomplete on enter: Chrome does this, if I type in https://example.com (enter), it makes the mistake of autocompleting to https://example.com/some_page_I_visited_yesterday - Arguing: Some applications that I use have autocomplete spell checkers that continue to aggressively try to "correct" technical terms, uncommon names, or company jargon that's not kno…

Unlearning is a great option. I have in Firefox a persistent autocompletion for a URL that I typo'd once, which still shows before the one I've been to a thousand times (because it's first alphabetically, I suppose?)

Re: Rules for Autocomplete

#102
post #97

Here's two autocomplete mistakes that really irritate me: - Autocomplete on enter: Chrome does this, if I type in https://example.com (enter), it makes the mistake of autocompleting to https://example.com/some_page_I_visited_yesterday - Arguing: Some applications that I use have autocomplete spell checkers that continue to aggressively try to "correct" technical terms, uncommon names, or company jargon that's not kno…

Unlearning is a great option. I have in Firefox a persistent autocompletion for a URL that I typo'd once, which still shows before the one I've been to a thousand times (because it's first alphabetically, I suppose?)

You can use Shift+Delete on an entry to remove it from the autocomplete list.

Re: Rules for Autocomplete

#103
> Matches should be sorted alphabetically

This should only be done in lieu of information about frequencies. If I type "repub" into Google, "republic of korea" appears before "republic of ireland" because it's more popular with users in my demographic (and we know that they are not simply doing reverse alphabetization because "republic of gamers" appears after both).

Sorting should happen in this order:

- whether it's a prefix

- empirical frequency

- the number of tokens in suggestion

- alphabetization

With that said, achieving all of this at the same time is pretty difficult - especially within the prescribed sub-100ms response time.

> If there are no subsequence/substring matches, it can optionally fall back to approximate matches. This is rarely necessary to provide.

I completely disagree with this. Fuzzy matching is extremely powerful. People routinely get things wrong, particularly on mobile devices, and you don't want the suggestions to disappear the second I make a mistake.

Re: Rules for Autocomplete

#104
post #97

Here's two autocomplete mistakes that really irritate me: - Autocomplete on enter: Chrome does this, if I type in https://example.com (enter), it makes the mistake of autocompleting to https://example.com/some_page_I_visited_yesterday - Arguing: Some applications that I use have autocomplete spell checkers that continue to aggressively try to "correct" technical terms, uncommon names, or company jargon that's not kno…

That first one annoys the hell out of me.

Re: Rules for Autocomplete

#105
post #97

Here's two autocomplete mistakes that really irritate me: - Autocomplete on enter: Chrome does this, if I type in https://example.com (enter), it makes the mistake of autocompleting to https://example.com/some_page_I_visited_yesterday - Arguing: Some applications that I use have autocomplete spell checkers that continue to aggressively try to "correct" technical terms, uncommon names, or company jargon that's not kno…

Unlearning is a great option. I have in Firefox a persistent autocompletion for a URL that I typo'd once, which still shows before the one I've been to a thousand times (because it's first alphabetically, I suppose?)

My biggest gripe with Firefox's history bar is that it's so slow to update that I'll go to click something, and then the whole list scrolls down or up and I now click something entirely different.

Even with search autocomplete disabled it takes forever just to search the history.

Re: Rules for Autocomplete

#106
post #3

Earlier quoted context omitted.

What's frustrating with San Francisco is when you're in the US, type it in, and see San Francisco, Agusan del Sur; San Francisco, Cebu; San Francisco, Quezon; etc. pop up before the one in California... like what are the chances that you're in the US and referring to those instead of the one that's actually in the US?

Matches should be sorted by a weighted score that takes both geographical distance, prioritizing San Jose over San Jose appropriately rather than blindly sorting them adjacent.

Exactly, some rules are meant to be broken. If the user is believed to be in northern California and types 'San ', then "San Francisco" should probably be higher up the list than "San Diego" despite that not being alphabetical order.

Determining whether or not the autocompletion should work like this is a matter of common sense applied by the developer, there is no hard and fast rule. In some hypothetical circumstances it may make more sense to sort by population size, rather than geographic proximity (let alone alphabetically.)

Re: Rules for Autocomplete

#107
> The user should never have to take extra steps to not use autocomplete.

This is so annoying in VSCode. Often it has a really dumb autocompleter (if the language is hard to autocomplete for - Rust or Python for example), so there are always autocomplete options no matter what you type.

Also, pressing enter is the way you pick an option. Which means if you are typing something quickly followed by a newline like this:

  // This is a comment.[press enter]
You will actually get some nonsense like this:

  // This is a comment.operator+=()
Very frustrating.

Re: Rules for Autocomplete

#109
> If there are no subsequence/substring matches, it can optionally fall back to approximate matches. This is rarely necessary to provide.

> Matches should be sorted alphabetically.

But pay attention to other languages / alphabets. From 2009:

https://alistapart.com/article/accent-folding-for-auto-compl...

Re: Rules for Autocomplete

#110
post #9

One rule I always consider important: > If I type the next letter of the top match, it should remain the top match. I find these types of inductive rules might be a better way to express how autocomplete should work (given a limited universe of suggestions).

Mac Spotlight Search doesn't follow this rule and it's sooooo annoying. I have Firefox and Firefox Developer Edition both installed and the top search suggestion seems to randomly switch back and forth between the two depending on how many letters of "firefox" I type.

Trying to switch to 1Password is somehow even more irritating. Typing "1p" reasonably suggests 1Password. If I continue typing "1pa", however, I'm given the hilariously unrelated knowledge that 1 Pascal is equal to 0.0075 Torrs. Pressing return then takes me a Google search (in Safari, which isn't even my default browser) for "1pa" which gives me yet another pressure unit conversion, 1 Pa = 1e-5 bar.

Post reply on HN