6 ms·
I think, in these days, it is not too much to ask for the intelligent completion, e.g. when you type dot or arrow, to get corresponding members of class/struct
by exim 14y ago
I think, in these days, it is not too much to ask for the intelligent completion, e.g. when you type dot or arrow, to get corresponding members of class/struct - the information is just there and the editor has enough power to parse it...
Same goes for a very simple word completion - when the editor already encountered the word in the previous line.
These are just _very_ basic things.
- rapind 14y agoIt all depends on your average typing / coding speed. Autocompletion doesn't offer a lot to someone who knows the language framework really well and type 90+ wpm. You may even find it's annoying more than helpful most of the time. I'm not that fast and to be honest I really don't miss code completion at all.
- jules 14y agoIt's not so much about typing less as it is about interactively learning to use an API or codebase. Suppose you have a comment object and you want to get the body text of that comment. With autocompletion you can just type `comment.` and you'll immediately see whether it's called "body" or "text" or something else, instead of having to browse around the codebase (which incidentally is also easier in an IDE that understands your code, because you can put your cursor on the class name and press a "go to definition" key instead of having to find it manually). Another invaluable feature related to this is documentation as you type. I can never remember the order of the arguments to the fold function. Fortunately Visual Studio helps out: https://dl.dropbox.com/u/388822/intellisense.gif https://dl.dropbox.com/u/388822/intellisense.gif (somehow my mouse pointer shows up in white, which makes it hard to see, but if you hover over the variables you get type information & documentation).
- rapind 14y agoTo me what you're describing are imagined problems. They aren't real problems for someone who eschews autocompletion tools. No offence intended. I would argue that the autocompletion training wheels for learning a new API are really only useful if you're rarely going to use that API again. If you're going to be using it a lot, there's actual value in spending the extra effort to learn it's functions. It'll stick more. Unless you have a photographic memory your brain will tend to discard information it had to expend no effort on, and autocompletion basically becomes background noise. I theorize that a fast typist will gain the edge after using the API 10+ times, even if they have to look it up the first couple of times, because the additional effort and focus they had to give to the task will commit it to memory (and they will potentially learn more about what the API is doing). The focus is often on typing the fewest characters, but I think that's the wrong thing to focus on most of the time when choosing an editor.
- skrebbel 14y agoMost APIs I use I don't intend to use many times again. If I'd be coding against the same 5 libs over and over again, chances are big I'm coding roughly the same thing over and over again. That sounds very boring. (that, or i'm coding something low-level like a db or a protocol - but are you?)
- rapind 14y agoMost APIs I use, I end up using over and over and over again in different projects / applications. Only ever using 5 libs does sound incredibly boring. However the toolbox of libraries I've accumulated repeated experience with over the years is in the hundreds, and learning more about them has proven worthwhile. I assume most developers would say the same.
- jules 14y ago> I would argue that the autocompletion training wheels for learning a new API are really only useful if you're rarely going to use that API again. If you're going to be using it a lot, there's actual value in spending the extra effort to learn it's functions. Couldn't agree more with the second sentence: I actually print out a listing of common APIs and take the time to memorize them. But you just described 90% of the APIs in your first sentence. For those APIs having quick access to autocompletion lists (to see which methods an object supports) and quick access to documentation is tremendously useful. As for your theory, common sense would say that how much you learn is proportional to the time spend on it. So if you use the API 10 times by looking it up manually, and you use the API 10 times by looking it up in contextual autocomplete, then yes you're going to learn more with the manual lookup. But this is an unfair comparison: you'd spend much more time on the latter than on the former. In the same time to look up the API 10 times manually, you could have looked it up in contextual autocomplete 30 times and then you'd have memorized it just as well. I sense a lot of irrational aversion to autocomplete, that it's for slow typists, it's training wheels, and Real Men don't use it. Look at it as an incredibly quick way to look up documentation. In fact unless the method name is really long I do not use autocomplete as autocomplete at all: I fully type the method name instead of hitting a key to accept the completion. It's just a way to short circuit the process of switching to a web browser, searching for and reading the documentation of the relevant class/module, and switching back to the editor.
- exim 14y agoEven if I exactly know what to type and I can type fast, I still prefer to achieve same with 3 keystrokes rather than typing full 20-30 symbols.
- clintjhill 14y agoBut it's not. In fact intelligent completion is incredibly hard for dynamically typed languages. Those IDE that do perform intellisense or autocomplete with dynamic languages do it with very basic ability. In a real world dynamically written code file the editor simply has no way of knowing the members of a class. Or if it is even a "class".
- lyime 14y agoSometimes the simples things are hardest to implement. Visual voice mail - No brainer, but took a decade.
- jamesaguilar 14y agoNo one's saying it's easy, but enough IDEs have done it that some of us have come to expect it.
- snprbob86 14y agoI started programming on VB3 and spent many years doing Visual C++ and C# as well as quite a bit of Java with IntelliJ. I depended deeply on IntelliSense/autocomplete. Years later, I don't remember how I ever got anything done with that stupid distracting drop down box. It's just so easy to arrow up/down through that list and hope to stumble upon the correct method to call. On the rare occasion that I type that member accessor dot and don't know what I want, I much prefer full-sized documentation in a browser that I can cmd+f on.
- pbz 14y agoUsing it as an alternative to documentation is a small part. First of all you get a confirmation that what you have up to that point is somewhat correct. If the dropdown doesn't show then something's wrong - sometimes that's ok and expected. You also get a type confirmation and actual completion as in type one or two characters and have the rest filled out for you.
- snprbob86 14y ago
- no_more_death 14y agoDynamic languages are not ideal for huge code bases. But huge code bases are not ideal, period. Dynamic languages grant huge power to small programs. Greater power through less code is surely the future.
- spooneybarger 14y agoThe work that http://www.vpri.org/ http://www.vpri.org/ has been doing around OMeta, Nile etc is really exciting. It is detailed in the later part of this Alan Kay presentation: https://www.tele-task.de/archive/video/flash/14029/ https://www.tele-task.de/archive/video/flash/14029/ ( around minute 45 or so up, perhaps earlier for more background )
- kamaal 14y agoOnly if we consider future of problem solving involves writing code. Tool generated code, might be a big thing in the future. Eclipse + Java is already 80% tool generated code.
- damncabbage 14y agoSteve Yegge has some interesting points to make about generated code: http://steve-yegge.blogspot.com.au/2007/12/codes-worst-enemy.html http://steve-yegge.blogspot.com.au/2007/12/codes-worst-enemy...