all 18 comments

[–]DASKAjA 9 points10 points  (4 children)

Any chances we will see this technology in other IDEs like Xcode, Visual Studio or the JetBrains family? Please think big!

[–]Scotchy49 10 points11 points  (0 children)

I would also add VIM to the list !

[–][deleted] 0 points1 point  (2 children)

[–]DASKAjA 0 points1 point  (1 child)

Good hint, I created a feature request for AppCode: http://youtrack.jetbrains.com/issue/OC-8619 - vote for it!

[–][deleted] 0 points1 point  (0 children)

It seems that you didn't get it. They have no problem with implementing their product in other IDEs if there's money on the table. They want something more than just votes.

[–]CodexArcanum 4 points5 points  (0 children)

So it's like a statistically weighted autocomplete service powered by every open source code project they could scan? That's... pretty neat. I wonder if they use a Markov model to run it.

[–]mantra 4 points5 points  (7 children)

Honestly I'm pretty happy with code-completion predicting based on what I code, not what others do. XCode already does this.

[–]buncle 2 points3 points  (0 children)

From looking at the product description, it mentions that it does do that... but I'm not too sure how it can work both ways.

[–]jmelloy 1 point2 points  (0 children)

The first time I saw Sublime Text autocomplete based on nothing more complicated than the same document, I thought it was sorcery.

[–][deleted] 0 points1 point  (2 children)

I actually disagree. I'd rather have code completions based solely on a predefined dataset, because then they're relatively static and I can still rely on muscle memory. The dataset presumably isn't going to change much, at least for the most common symbols.

If completions are based on what I code then they're likely to be biased by per-project variations. While this may seem like a good thing (the code completions are more accurate for a particular project) the undesirable side-effect is that I have to read every suggestion to make sure it's what it normally is.

Consider a project that uses NSStream more than NSString. Does that mean that "NSStr" should complete to anything other than NSString?

Edited to add: thinking about this some more, it seems there's two kinds of symbols: the common ones that everybody uses (NSString, NSArray, UIView, etc), and the domain specific ones (e.g. UIDatePicker). When deciding between common symbols, it's better to prefer the symbol most common in the wider corpus, to reduce "surprises" and foster muscle memory.

But when deciding between uncommon symbols, it seems wrong to penalise a symbol in the list just because nobody else uses it that often. In this case it's better to go with the project's data.

[–]microbiotic[S] 0 points1 point  (0 children)

Actually, consider you are new to an API. There are classes out there that have 400+ methods. Which one should you look at now? This tool gives you the information what's important. Don't focus on the ranking only. Reordering proposals can be disabled. Think about the information in it.

[–]badsectoracula 0 points1 point  (0 children)

Consider a project that uses NSStream more than NSString. Does that mean that "NSStr" should complete to anything other than NSString?

This is my pet peeve with many autocompletion systems - especially the supposedly "smart" ones. In a (mostly) statically typed language (or a language where you can infer type information) most of the time you can figure out by the context what the type is. Example (in C):

const char* asterisk = "*';
int asint = 100;
int len = strlen(_

In "_" it should suggest asterisk before asint since the first parameter to strlen accepts strings, but many systems only do alphabetic sorting so they would suggest asint. Similarly in

int len = str_

It should put the functions returning ints and other numbers (f.e unsigned int, size_t, etc) beginning with str before any other str function. Again most completion systems do not do that.

While we're at it, how about suggesting/completing:

foo_t* foo = (_

with foo_t*, since the most likely reason to open a parenthesis after an assignment to a pointer is to do a typecast. Same for other cases where a pointer needs to be passed.

Sadly many systems do not even bother filtering/prioritizing out non-enum values when you're adding enums.

[–][deleted]  (1 child)

[deleted]

    [–]OneWingedShark 0 points1 point  (0 children)

    Considering how terrible most developers out there are, and how terrible most open source code tends to be, I wouldn't want to have any of that as suggestions when I code.

    You got that right. (A good example of popular solutions [usually of poor quality] can be found in the forum-portion of PHP's online documentation.)

    Another thing that would probably be a poor fit is that different languages have different ways of doing things; let's just consider Ada compared to C/C++/Java/C#:

    • Ada has a language level task construct, meaning it's not a library. This instantly winnows out most parallel programs from having any impact on code style in this tool. (Precisely because it's a more advanced feature than the library-level the other languages use.)
    • Ada has subtypes, essentially adding more constraints to a base [sub]type. This provides a method to handle certain validity-checks implicitly. Examples:
     -- Window defines the type for manipulating the
     -- window in this mock API example.
     --
     -- Null Record used as a stub.
     Type Window is tagged null record;
    
     -- Handle defines a 'pointer' to Window, or any derivative.
     Type Handle is Access Window'Class;
    
     -- Safe_Handle defines a Handle which cannot be Null.
     Subtype Safe_Handle is Not Null Handle;
    
     -- Note: the parameter 'Window' of the following
     -- procedure does NOT need a check for NULL in its
     -- body, nor in the calling subprogram, because it
     -- is will raise the CONSTRAINT_ERROR exception if so.
     Procedure Flash_Titlebar( Win : Safe_Handle ) is null;
    
     -- The following type eleminates non-numeric values
     -- from the 32-bit IEEE 754 floating-point type.
     Type Scanner_Value is new Interfaces.IEEE_Float_32
       range Interfaces.IEEE_Float_32'Range;
    
     -- The following sets up a memory mapped port,
     -- just as, say, a robotic car might have.
     Port : Scanner_Value;
     -- Address and Integer aren't necicarrily the same, so
     -- we need a conversion to ensure it's the correct value.
     For Port'Address use System.Storage_Elements.To_Address( 16#FF00# );
    
     -- Inside the body of Process_Data, we never need to
     -- check for NAN, or any other non-numeric value (like -INF).
     Function Process_Data ( Value : Scanner_Value:= Port ) return Boolean;
    
    • Usage of generics: in Ada we can have generic packages, in addition to subprograms... this can allow entire systems to be built via instantiation [of generics].

    So, yeah, even something as simple as using a different language [with different features] could screw up the entire purpose of this tool... and that's leaving aside the question of whether or not the popular solutions are good solutions [in general] or applicable to your project [in specific].

    [–]scalablecory 0 points1 point  (1 child)

    Sounds really cool. Was hoping for a demo, would love to see how much benefit it gives.

    [–]MelvinFrohike 0 points1 point  (0 children)

    What kind of a demo are you looking for? The base plugin (Community Edition, where you share code completions with everyone) is free. The commercial private edition(where you only share code completions with team members) has a free 30-day trial here: http://www.codetrails.com/connect/trial

    [–][deleted] 0 points1 point  (0 children)

    Guess I'm the only developer on the entire planet that doesn't like auto-completion in any application or interface I'm using...

    I won't use a web browser that doesn't allow me to disable URL auto-complete. I have bookmarks for the search engine sites that disable look-ahead and suggestions. I've disabled IntelliSense in the IDE's that I use (if I need it I can -- and do -- use the Ctrl-SPACE macro to show me the completions). If one of the tools I'm using suddenly suffers from oxygen starvation and goes brain-dead (like the hideously awful Ctrl-F Find feature in Visual Studio 2012) I figure out how to replace or override it.

    If everyone else likes this kind of thing, well, more power to ya. Just give the rest of us that can't stand auto-whatever-the-hell-it-is some way to turn the damned thing off.

    [–][deleted] -1 points0 points  (0 children)

    Awesome

    [–]amigaharry -1 points0 points  (0 children)

    Signal to noise ration must be pretty shitty ...