This AI-powered Auto-Completer is Helping Developers Write 25% Less Code (thenextweb.com) 67
Ivan Mehta, writing for The Next Web: For years, IDEs (Integrated Development Environment) have tried to make development quicker by predicting the next part of a developer's code. Now, startups like Codota are using AI to help developers with code completion on any code editor. The Israel-based startup was found in 2015 by Dror Weiss and Eran Yahav. Codota's free-to-use autocomplete plug-in supports major languages such as Java, Python, Javascript, PHP, and Rust across major IDEs such as Eclipse and Android Studio. Yahav told me that Codota differs from other code completion AIs as it's able to predict the next token completion by leaning on an AI-based code 'dictionary.'
Visual Studio (Score:1)
Re:Visual Studio (Score:4, Informative)
MsDev is getting better but it is so damned slow. Try loading 60 vcxproj files with 100,000 source/header files...
But context sensitive auto complete has been there for a long time.
Not really (Score:5, Insightful)
When we say that developers are "writing code," that really entails more than just the mechanical work of transferring the code from your head into the computer. There's design, research, tracing existing code, laying out data structures, and all sorts of other tasks that this plugin can't possibly help with.
Reducing the number of keystrokes that you have to make by 25% may be helpful, but there's no way that it actually saves 25% of the effort in coding. At best, it's probably low single-digits in terms of percentage of effort saved.
I'd also be interested in finding out whether developers perceive an increase in effort in checking over what the autocomplete added to make sure it's really what was intended. I can certainly imagine an increase in bugs where the autocomplete added something that looked right when coding quickly (which is the point, right?), but was actually subtly wrong.
Re:Not really (Score:4, Insightful)
All of this! And especially that last part. I've found myself fighting with code completers doing batshit insane thing or wrong things or unwanted things so often, that the majority of their features I disable. It just isn't worth the extra headache, when as you state, the primary job is focusing on solving complex logical issues, NOT pounding keys.
Re: (Score:3, Informative)
This! And Codota for Java frequently causes slowdowns in Eclipse, sometimes even causes freezes and exceptions in other functionality.
Predictors need Stack Exchange integration (Score:3)
Then they really could automate cut and paste.
Somewhere, long ago, somebody must have written an original line of code...
Re: (Score:2)
Yes. I am fairly sure I did - but it was Macro11 assembler in 1974.
Since then, we have had C - which converts your thoughts into pre-prepared assembler cliches.
One day, you millenials will reinvent Borland and "drag and drop".
Re: (Score:2)
Macro11? With 16bits!
When I was lad, used to code 12 bits on PDP 8. None of this Macro nonsense, via the toggles on the front of the box. Cut the paper tape by hand (well, actually using a hole punch).
Macro 11 did the work for you.
Re: (Score:2)
Re:Not really (Score:4, Interesting)
For example many functions support passing an argument by value as well as by reference. The auto suggest offers might offer by value. All the simple unit test cases will pass without issues. But it will have difficulty in scaling when you throw real world data.
(Yes, I am speaking from personal experience. A missed & passed a container by value, calling copy constructor on the fly, all simple test cases went through, then the real world data was passing the container, an std::map actually, with several million entries. Choked, took so long to find because, debug builds are too slow for real world data to step through, release debugging to find the time sink in the function call was really painful.)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
There is no really powerful debugging tool for jobs that take several cpu hours in a 32 core machine. In fact
Re: (Score:2)
Re: (Score:2)
What will bite you more is that languages with GC coincidentally tend to be poor at exploiting vector units rather than anything to do with GC.
Low level programming is more than just getting the right processor extensions working. Low level programming is about leveraging the architecture, and while "the architecture" includes instruction sets, it also includes the runtime behavior of software components, such as the operating system, driver interfaces, the language/system garbage collector, and even the memory managers a
Re: (Score:2)
Rest assured, and don't feel bad. The feeling of condescension is mutual. Many of us have similar attitude towards software engineers coming with formal training in comp sci. They are quite articulate in comp sci terms, take over meetings and impose data flow architectures that totally bog down in real life situations.
I hate to give exampl
Re: (Score:2)
Re: (Score:2)
Must have clicked the wrong reply button. Sorry. So may be the young whippersnappers are actually on to something complaining about absent minded old hicks ?
Re: (Score:1)
I've seen scientific code that takes several *days* to execute on machines with many more than 32 cores, and believe me, the language isn't the problem.
Re: (Score:2)
I suppose it could depend upon the training.
If training including code written against that specific function and library, it may prioritize and remind the coder that usually arguments passed to that function have a '&' in front of it. Particularly if it is trained against a body of code from other developers, it may point that out where a newcomer to the codebase otherwise might not think about having to pass by reference.
In some scenarios it may be less likely to fat finger or forget to include someth
Re: (Score:3)
That reminds me of one of the most painful bugs I ever tracked down. I can't remember the exact details but it was a list where the input was sorted and binary search was used to find stuff quickly. The tests passed but with real data weird things sometimes happened. It took a very very long time to find the cause which was a missing * or &. The "less than" operator used pointer comparison and not object comparison. During testing, objects were almost always created ordered in memory so sort order for o
Re: (Score:3)
They include a video (YouTube link [youtube.com]) where because you created a function called calculateRunTime the AI is able to infer that startTime and endTime might be good identifiers when you start typing start and end so it populates the auto-complete suggestions with tho
Re: (Score:2)
Re: (Score:2)
One example given is that if you make a Student class it suggests name and ID as fields.
Seems their AI was trained with badly written OOP.
It is far more likely that this class represents a student record of some specific kind, and not the generic idea of a student.
Once badly named, it becomes the kitchen sink of all things student related. What courses is the student enrolled in? Throw it in there! What tuition payments have been made? Throw it in there! Scholarship? Jam that bitch in there! Food budget? Yep ram that one in there too! Emergency contact info? You betcha that gets stuck in
So? (Score:3)
Re: (Score:1)
Re: (Score:2)
Parse error: invalid syntax.
Re:Not really (Score:4, Funny)
It looks like you're writing some Internet-facing code.
Would you like help?
* Insert a buffer overflow.
* Add some SQL injection.
* Just write buggy code without autocomplete.
[ ] Don't show me this tip again.
Re: (Score:2)
When we say that developers are "writing code," that really entails more than just the mechanical work of transferring the code from your head into the computer.
Quite right, and very important indeed.
"...well over half of the time you spend working on a project (on the order of 70 percent) is spent thinking, and no tool, no matter how advanced, can think for you. Consequently, even if a tool did everything except the thinking for you -- if it wrote 100 percent of the code, wrote 100 percent of the documentation, did 100 percent of the testing, burned the CD-ROMs, put them in boxes, and mailed them to your customers -- the best you could hope for would be a 30 perce
Re: (Score:2)
Reducing the number of keystrokes that you have to make by 25% may be helpful, but there's no way that it actually saves 25% of the effort in coding.
I wonder if the continual degradation in keyboard quality has anything to do with people actually thinking crap like TFA is actually useful. If you're hunting and pecking on a touchscreen soft keyboard...
Keep my data on my machine. (Score:3)
It the code could have been predicted... (Score:2)
Re: (Score:2)
Or it is just really better implementation of what the IDE does now. Calling a method that takes object type foo as an argument, and if you only have one object of type foo in your scope many IDEs will autocomplete it for you since it is the only thing that you could possibly enter other than maybe null...
Re: (Score:2)
So for one, source code is for humans, not for computers. A computer is just fine with exceedingly terse code (hexdump your compiled binary, particularly with optimizations enabled, computer is fine with that but human is not). We need verbose variable names and redundant structure to keep up with what is going on.
For another, completion has the benefit of not having to be 100% correct without human review. In their example, they see 'dif' as a variable name, and make the language-based guess that 'diff' is
Re: (Score:2)
We need verbose variable names and redundant structure to keep up with what is going on.
Do we really? I very much prefer (map 'vector #'1+ data) over vector <int> result; for (std::vector<int>::iterator i = data.begin(); i != data.end(); ++i) result.push_back((*i)+1); return result;. Clearly even C++ people didn't think that we "needed the redundant structure to kee
Re: (Score:2)
Eh, the demo seems to be a bit more tame. It guesses short trivial logic and nothing more. That's the way it goes with tech press releases, whoever exaggerates their approach to the most unbelievable levels without *quite* lying (and sometimes lying) wins.
I can write really short code, but who can read it (Score:3)
In some cases that might be true. In other cases, the model is predicting what you MIGHT want next - you do need to specify what you ACTUALLY I want to do.
If I say to my wife "I love", she can predict that the next word may be "you", but I've also said to her many times "I love cake".
Even where it's entirely predictable, after 20 years I've learned how to write very compact code - which few people can read. Compact isn't always good. Coming from the ed, sed, grep, awk line, Perl has a default argument for
Re: (Score:2)
Re: (Score:2)
Perhaps I misunderstood what you were saying. I interpreted your comment as saying you could write more compact code WITHOUT the tool. Yes, you could - and they may not be a good thing.
Still, it seems it would mostly be useful to those who are knowledgeable about programming but NOT knowledgeable about the language they are using. As someone else said, actually writing the code itself is a small part of programming*. If you know the language, you'll spend very little time typing code. Of course very good pr
Ps that's the kernel style (Score:2)
Ps the "lots of little functions" you end up with is pretty much Linus' style and the kernel style. Of course when writing kernel code you sometimes have to think about how your code interacts with or matches the other 28 million lines in the kernel. But not as much as one might think, because modules and subsystems.
Re: (Score:3)
^^^^ This, a thousand times this.
Auto-complete allows you to write code without thinking ... and that is a very, very bad thing.
Re: (Score:2)
You are a very lucky man. The average wife on hearing this would immediately ask for a divorce, citing cake as the co-respondent, and sue for enough alimony to keep her lawyer rolling in Vegas for the next hundred years.
"Careless words cost lives"
Wrong title (Score:2)
Re: (Score:2)
In many cases, yes, that's exactly what it means. The issue is that "many" != "all", and if you eliminate the "complexities" you also eliminate the possibility of accomplishing those cases that fell between many and all. The simpler you make it, the less it can do.
Something like this promises a middle ground where the complexity is still there, but it suggests options to cover most of the use cases, even if not the more complex ones which you can still do by hand.
That said, promises like this are very commo
Re: (Score:2)
Much of it is completing longer variable names that are longer for the sake of humans. Sure you could name your symbols a, b, c, d... but no human could read it. This of course is normal and AI is not needed.
The portion where AI comes in is guessing what you want to do. In their demo, they assume you want a variable named 'diff' and based on historical data, 'diff' usually represents something subtracted from something else and you only have two variables so you probably want to subtract them.
The key word i
Re: (Score:2)
Or it means that programmers are lazy who think the greater number of letters typed means they're unproductive.
Code is about understanding, not some code golf terseness game.
If it were otherwise, the entire codebase of the planet would be written in perl.
Excellent! (Score:3)
- CEO
Re:Excellent! (Score:5, Funny)
You, sir, are Management Material!
Re: (Score:2)
Instructions to the underlings (Fire ..) is mixed up with the negotiation bits (lets split it 50-50) meant for the board.
Re: (Score:2)
The secret THEY don't want you to know! (Score:5, Funny)
Re: (Score:1)
Software developers hate this one weird trick. [imgur.com]
Another *Good excuses for sloppy code* (Score:2)
I was putting comments that the AI missed!
Yawn! (Score:5, Funny)
Yeah but... (Score:3)
Nice, but can it save me time by automatically putting in "vodi", "pirnt", "flaot" and other important keywords?
Waiting for the stackoverflow feature + others (Score:4, Funny)
I think I'll wait around on this, till the add stackoverflow automation - the ability to lift code automatically from the highest scoring stackoverflow answers, even if they are solving a different problem.
This will then more closely match my coding style, which generally consists of 'copy / paste', followed by days of debugging, until the realisation that the code I copied wasn't fit for purpose, followed by watching hours of online tutorials which teach you how to make applications nobody ever makes, followed by many more hours of refactoring, followed by a punishing PR where people who can code circles around you pretty much rewrite everything you coded in one line. So, yeah, your code actually worked, but somehow you managed to recreate core language functionality, because you didn't know it was there.
Automate that with AI, please! - I can then spend my time planning an early retirement, as my company finally realises I can't actually code - but that's OK, because my IDE now does it all for me.
Who needs AI for this? (Score:2)
Helping Developers Write 25% Less Code
I don't need AI for this - I'll happily write 25% less code!
(Willing to negotiate up to 100% less)
False. It's Java only. (Score:1)
Boycott Divestment Sanctions (Score:2)
What will their AI do with this?
const NAKBA = "BOYCOTT_DIVESTMENT_SANCTIONS";
$bds = N