Live data from Hacker News

Autocomplete as an Interface (2015)

benkuhn.net

171–180 of 197 posts

Re: Autocomplete as an Interface (2015)

#171

While IPython is cool, lets not forget autocomplete exists even in the default python interpreter Python 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516] on linux Type "help", "copyright", "credits" or "license" for more information. >>> s="" >>> s.[TABTAB] s.__add__( s.__getattribute__( s.__lt__( s.__rmul__( s.encode( s.isdecimal( s.join( s.rjust( s.title( s.__class__( s.__getitem__( s.__mod__( s.__setatt…

And you can get similar results inside your favorite programmer's editor using something like Jedi:

https://github.com/davidhalter/jedi

Re: Autocomplete as an Interface (2015)

#172

Earlier quoted context omitted.

Code completion (not auto complete) was always meant for discovery and never to help save on typing, at least in textual environments. The idea of immediately showing you what some symbol can do without using the mouse is very powerful.

ehhh. Only if your API is incredibly simple. You still have to roughly know that some operation exists and what that likely name is for the operation. Otherwise you're scrolling through a list of hundreds or even thousands of possible matches. If you know you have an array and you know what you want to do with that array but don't know the name of the operation you want to do with that array, then completion as a for…

Nobody is suggestion autocomplete replaces basic API knowledge, reading the docs, etc. What they’re saying is autocomplete saves having to remember every facet of the API precisely.

It’s like a rounded edge on plug pins, you still have to know where the plug socket is to plug something in but the rounded pins mean You don’t need to be millimetre perfect when inserting it because the plug will slide along the curve and guide itself into the socket.

That’s the point of autocomplete, it’s about enabling developers to focus on remembering the important stuff while the IDE helps guide them around the more granular bits that are still syntactically important to the compilation of software but don’t really matter to the logic you’re writing.

Re: Autocomplete as an Interface (2015)

#173
post #161

Earlier quoted context omitted.

What does that mean ? If you felt better and personally were prouder of the work done back in C with no autocomplete but the business was deriving more value from your work with autocomplete, how should One answer? Or more importantly, what if the requirements are so much more today that if you adopted the same tools as 20 years ago you’d fall behind? I admire those who stick with their old tools and forgo modern one…

I wasn’t implying one way or the other and I don’t think that the parent post was either. The point I was making that when I was writing C day in and day out and mostly just working with a combination of my own code and my companies vote libraries, it was easy to use just a text editor and the command line to build. But things have gotten more complicated since then. No one could be expected to know the hundreds of f…

Once a code base reaches a million lines of code it gets difficult to keep it all in your head, and even if the software has a nice architecture with module patterns or what not, just the sheer amount of different methods and functions will slow you down. Sure autocomplete will help, but the best productivity solution afaik is to keep the code base small :P

Re: Autocomplete as an Interface (2015)

#174
post #30

Earlier quoted context omitted.

> I wish more engineers cared about auto complete. A lot of software people I know say "just use vim" or "just remember things" and I feel these view points really stifle progress. They are not very well versed in vim if they don't know about the autocomplete capabilities of it. The most basic form is matching with ctrl-n in insert mode. http://vimdoc.sourceforge.net/htmldoc/insert.html#i_CTRL-N This can be beefed up…

Vim can be used to do that, but not by me. After 12 years of using vim through MIT and various software engineering jobs, I've accepted that it would take a person of my mental abilities waaaaaay too long to set up. Or, can you recommend a good book on vim package management and debugging?

In my experience, there are people that like building their development from the bottom up and others like going from top down.

It's perfectly fine to get a full featured IDE. If you miss the vi stuff, most IDEs nowadays have pretty good vim emulations (and thanks to to neovim, many have even perfect vim emulations).

Nevertheless, for an intro into vim plugin management, a good book is "Modern Vim by Drew Neil".

Re: Autocomplete as an Interface (2015)

#175
post #59

Earlier quoted context omitted.

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.

An issue could be if it spit out someone else's code character for character as a completion.

Re: Autocomplete as an Interface (2015)

#176

Earlier quoted context omitted.

ehhh. Only if your API is incredibly simple. You still have to roughly know that some operation exists and what that likely name is for the operation. Otherwise you're scrolling through a list of hundreds or even thousands of possible matches. If you know you have an array and you know what you want to do with that array but don't know the name of the operation you want to do with that array, then completion as a for…

Nobody is suggestion autocomplete replaces basic API knowledge, reading the docs, etc. What they’re saying is autocomplete saves having to remember every facet of the API precisely. It’s like a rounded edge on plug pins, you still have to know where the plug socket is to plug something in but the rounded pins mean You don’t need to be millimetre perfect when inserting it because the plug will slide along the curve an…

Code completion does replace a lot of doc use cases, like autocomplete in a shell reduces the need to go to man pages. But ya, code and auto completions are like HUDs for more structured experiences based around text editing.

Re: Autocomplete as an Interface (2015)

#177
post #175

Earlier quoted context omitted.

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.

An issue could be if it spit out someone else's code character for character as a completion.

I presume the code used for training has been selected among code released with specific licences. Otherwise it would be a copyright violation anyway.

Re: Autocomplete as an Interface (2015)

#178

Earlier quoted context omitted.

Interesting, but why not just have the autocomplete as a pane on the side so that you can focus, in the 99% case where you do have a good grasp of your dependencies?

That would certainly be a viable middle ground, but I simply don't find the in-editor popup to be distracting. I find a good many things distracting while working, but I actually like the autocomplete popups.

I don't think the main problem is that they're distracting, in the drawing attention away from what you're writing sense. I think the main problem is that, for an unfamiliar editor, the autocomplete takes an unknown subset of keystrokes, meaning that common things like inserting a newline or navigating vertically can interrupt your train of thought.

Once you get familiar with a particular editor then these problems become less acute. What remains is the obscuring of other lines of code which can be fixed by making the autocomplete box only appear when you press tab.

Re: Autocomplete as an Interface (2015)

#179
post #72

Earlier quoted context omitted.

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?

I could imagine two tools: 1. A tool that parses the text and draws red underlines on all the errors, this exists but (at least for C++ in VS 2017) it is quite slow. 2. A tool that automatically populates and updates types of variables and functions.

Both of these could be achieved by somehow decoupling the front-end (as in before semantic analysis) of compilers and making them output the AST in some standardized tree-structured format like XML.

Re: Autocomplete as an Interface (2015)

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

What's often missing from these discussions is the impact on human memory. Back when I started programming, I never used syntax highlighting. It just wasn't a thing for a large part of my early years. Text mode VisualBasic and QuickBasic didn't have it. Nor did GW-BASIC, QuickC, Pascal, I could go on... I was at the point where I could write C code and have it compile the first time. No syntax errors, no compiler err…

yeah. maybe that's why i get this feeling of being out of touch with software that was written with an IDE. you can see the difference come debugging time. C/Emacs you just know where everything is, just reading the logs (sans stack trace) is enough. Java/Eclipse ... you need to bring in the heavy machinery, and then good luck to you.
Post reply on HN