I think, in the future, ideally, you will be able to do a programming interview, using a tool like kite, in a language you don't know and feel comfortable.
So when I am learning a new language, I don't want to have to look up if the length of a vector is len(), length(), .len, .len(), .length() and so on. In fact, I don't want to do this for languages that I do "know".
aCollection.<TAB>
list of all the method on given collection pops up. If it's short, just skim it and choose something which appropriate. If it's long: aCollection.l<TAB>
check if there's something similar to length/len, use it, otherwise: aCollection.l<BACKSPACE>c<TAB>
check if there's something similar to count then use it, if not: aCollection.l<BACKSPACE>s<TAB>
check if there's something similar to size and use it. Finally, if all the guesses failed, defer to documentation or google.Basically, (semantic) auto-complete is an inline quick-search facility for docs. Very, very useful if you know how to use it effectively.
I get your point though and there are cases where completion might be useful, but for me the context-switch to a search engine is just not that much of a hassle, but maybe I never enjoyed a good completion engine, so I might give it a try.
import module
module.<TAB>
and: def meth(self, ...):
self.<TAB>
and even: foo = Foo()
foo.<TAB>
It doesn't work for all possible cases, but as you said, you can always consult Google. It's just that I prefer not to leave my editor if I don't really have to.OTOH, I work with a lot (10+) of different languages and find even the dumb, basic autocompletion (which only offers to autocomplete words already present in the file) helpful. As other commenters noted, writing aLongAndDescriptiveFunctionNameToCall from memory every time may be inconvenient for two reasons: a) was it aLongAndDescriptive... or aDescriptiveAndLong...? and b) writing this much text takes time, and the more letters you have to type the more probable a typo gets.
Anyway, I think you should give a try to a few different auto-completion plugins/systems and see for yourself. You should probably spend a little time to configure such a plugin so that it doesn't get in your way when it fails (ie. has no good completion to offer), but once you make it so the auto-complete may become really helpful to you. Or it may not, but I think it's worth checking out.
In 5 years, once average computers are very fast, you will get something like.
len -> did you mean size()
based on the fact that so many other people have entered that.
I am sure there are other ideas besides that haven't even occurred to us.
But you need some user testing, and maybe some ML.
I mean, the machine needs to train enough to know that when the user types "string.len" they really mean "size(string)" and it can't just follow the alphabet anymore.
Of course then you have to deal with the case where the suggestion is subtly wrong (e.g. amount.add(increment) was intended to mutate the amount, while Number.plus is a pure function) and the programmer might not spot it, if they were unfamiliar with the correct usage in the first place. Now we are firmly in research territory, I think.
1. Do it in the cloud somewhere. You probably want to do this anyway so you can learn from everyone.
2. Now you can't indefinitely keep everyone's code in the cloud (as kite is learning), so you take the most common use cases and privacy minded coders can download those to their desktop.
3. Of course languages are constantly evolving so the "cloud archive" will always be live and learning from everyone
By the way, you would "learn" a mapping when someone searches for "len, length, .len" and so on but they finally settle on "size" so you would have the input and the correctly labeled target from people's code. You do have to watch them programming in practice though.
For the subtle variations, it would hopefully give you a list of suggestions in order of usage.
When I left IDEs for a terminal-based dev setup (Vim + CLI), this was what I thought. I rapidly discovered how incredibly wrong that was.
A big factor, for me, was that autocomplete kept me from making typos. Even with a rapid feedback loop, those typos build up. Plus, the reduced cognitive overhead that comes from being able to bang out code faster also lets me stay much more focused.
Intelligent autocompletion is a nice-to-have that I don't think I really miss, but straight-up dumb autocompletion has been a huge boon for my productivity.
No. It's programmers' dyslexia which leads to typos being repeated again and again.
The problem is that many programmers don't read their own code, and even if they do they don't know how to read it critically/carefully. It's incredibly frustrating.
There are a lot of similarities between writing code and writing prose. Many programmers are unaware of this. Even today, many programmers write code for machines to execute, not for other people to read. I feel that it's deeply wrong approach and that "creative writing" course (or something equivalent) should be mandatory for programmers.
I think we need a large shift in how introducing spelling and grammar errors into the code is seen. Namely, it should be viewed exactly the same as introducing bugs - it's that damaging in the long run. Please don't do this. Please use spell checkers and please learn your orthography.
Typing just the first or few random letters of veryDescriptiveLongMethodName and completing it with space/tab will always be faster. Using stuff like templates, smart completion, emmet, refactoring tool, constructor/method generators will always be faster, if you know your tools well.
I feel like with Java it makes a lot of sense to have smart completion, because you end up with incredibly deeply nested identifiers and such. A whole lot of typing. But, I don't code in Java, in the general case (aside from occasionally tinkering with Android APIs, with thoughts to some day making an app). For many more concise languages, it feels like a solution looking for a problem.
I could be wrong. This could be a thing that would provide clear value, if I were to put in the time to learn how to use it correctly. But, so far, I just feel vague frustration when I have the feature turned on.
That said, having docs available as you type is something I can see clear value in. I have to have API docs open 100% of the time when coding...having it jump to the right function as I'm typing it would be awesome. It seems like Kite does this, too, which is probably enough reason for me to use it. I've been poking at Python again lately (after many years away from it), because of Tensorflow and Keras, so I'll give this a go.
I wish they had a Linux version. I rarely work in Windows (though ConEmu and WSL has made it so I'm not terribly unproductive in Windows anymore, as I once was).
Regarding features, there's actually more than just autocomplete and docs: https://kite.com/tour/atom
It doesn't matter how well you know library X or the stdlib.
Some made up examples:
userRepository.findUsersWithPlan(planName);
customer.sendPaymentLateEmail(...);
Having powerful IDE assistance reduces the barrier between your thought and the computer.
When I think "send email to customer" I just want the shortest path to achieving that. I don't want to fiddle around or context switch.
Another advantage is that it can guide you into picking the correct option.
I have been burnt many times when looking things manually because you may find one option but not be aware that other options exist.
It's nice for the IDE to communicate to the human "now here's a list of valid things you can choose from".
If you look up from your text editor even a second, it will take several seconds to get back into context. So even if the page you want is already in your browser, and you just switch windows, you lose. Also autocomplete has three purposes: prevents unnecessary typos, is faster than writing it out, and lets you find API/docs.
How long it takes to find a relevant piece of code in your code base obviously depends on what tools you have for searching your local code, how much code it is and how good the search is. How long it takes you to find something online depends on how good the docs are etc.
How much value autocomplete is also depends on the strength of the type system of course. For C or Javascript there isn't much autocomplete can do with the contextual information, but with Java there is a ton to be gained (Long method names are norm, and object-dot notation feels almost invented for autocomplete). So if I were using something with a functional flavor, or a weak or dynamic type system I'd probably have a different opinion. But for strongly typed OO (C++, Java, C#, ...) the value for autocomplete is enormous to me.
Without autocomplete you can always make longer descriptive type/variable names because the time taken to write a type name isn't proportional to the length, only to the unique prefix or unique camelcase signature of the type name. E.g. for a DefaultUIRenderer I could write DUIR-Tab and know I had the right type (Insert obligatory Java joke about ContextFactoryProviderFactoryDecoratorVisitor here). How much you gain on this depends on how good a typist you are obviously. I have an error rate of around 1/10 chars being backspace, and you might argue it's because I do auto complete, I don't know...
> There are auto-completion tools for text editors, but I just never invest the time to activate or configure them
Me neither. That's why I think any reasonable IDE should be either a) working out of the box. I.e. hope that you can find an editor/IDE that ships with batteries included, or b) that it's at most a matter of selecting one plugin from a menu to activate support for language X in the editor. If I have to start configuring something with a text file somewhere then someone failed, either the makers of the language or the editor or both. Even in "plain" editors like VS code or Sublime you can usually just get a plugin these days.
> AFAIK there aren't completion tools which work well across different languages.
There are efforts to do this, but the name escapes me - that is, an effort to remove N languages times M editors and make a standard for syntax highlighting, autocomplete etc. that makes at an M+N problem instead.
Doing software development is mostly reading code and documentation. Obviously one also writes code and for sure one can't memorize every function or package name, but searching for it isn't that much of a bottleneck? Some time ago I wrote Java using Eclipse (which had/has reasonable auto-complete), but when I switched to different languages, I also switched my IDE and mostly use plain text editors these days. There are auto-completion tools for text editors, but I just never invest the time to activate or configure them and AFAIK there aren't completion tools which work well across different languages.
Maybe I revisit them at some point, but at the moment I do not really miss auto-completion.