7 ms·
Have you heard of GitHub copilot ? It’s based on GPT3 and I can tell you one thing: it does not generate meaningless prose (90% of the time)
by crubier 5y ago
Have you heard of GitHub copilot ? It’s based on GPT3 and I can tell you one thing: it does not generate meaningless prose (90% of the time)
- ghoomketu 5y agoYes I'm used it now but first time it started doing its thing, I wanted to stop and clap for how jaw dropping and amazing this technology is. I was a Jetbrains fan but this thing takes productivity to a whole new level. I really don't think I can go back to my normal programming without it anymore.
- amelius 5y agoHow many % of the time does it produce code that compiles?
- emteycz 5y agoThe overwhelming majority. Whatever used to take me an hour or two is now a 10-minute task.
- ilteris 5y agoI am so confused. Is there a tutorial explaining how you are using in the IDE whatever it is. I use vscode curious if it can be applied. Thanks
- crubier 5y agoIt works very well with VSCode. It has an integration. It shows differently than normal autocomplete, it shows just like gmail autocomplete (grayed out text sugggestion, and press tab to actually autocomplete). Sometimes the suggestion is just a couple tokens long, sometimes it’s an entire page of correct code. Nice trick: write a comment describing quickly what your code will do (“// order an item on click”) and enjoy the complete suggested implementation ! Other nice trick: write the code yourself, and then just before your code, start a comment saying “// this code” and let copilot finishe the sentence with a judgement about your code like “// this code does not work in case x is negative”. Pretty fun !
- icelancer 5y agoInteresting second use case; I use comments like this already as typical practice and I agree Copilot fills in the gaps quite well - never thought to do it in reverse... will give that a shot today.
- emteycz 5y agoI also like to do synthesis from example code (@example doccomment) and synthesis from tests.
- bidirectional 5y agoFrom my anecdotal experience, the vast majority of the time (90+%).
- crubier 5y agoIn my experience 95% of the time. And 80% of the time it output codes which is better than I would have done myself in a first approach (thinks of corner cases, adds meaningful comments etc.). It’s impressive.
- icelancer 5y agoI was exceptionally skeptical about it, but it's been very useful for me and I'm only using it for minor tasks, like automatically writing loops to pull out data from arrays, merge them, sort information, make cURL calls and process data, etc. Simply leading the horse to water is enough in something like PHP: // instantiate cURL event from API URL, POST vars to it using key as variable name, store output in JSON array and pretty print to screen Usually results in code that is 95-100% of the way done.
- inglor 5y agoThis - it is tremendously valuable to me and I use it all the time at work.
- skybrian 5y agoWhat do you use it for?
- inglor 5y agoCoding, I actually had to forbid it today in a course I teach because it solves all the exercises :) (given unit tests with titles students needed to fill those tests in)
- singlow 5y agoIsn't that just because others have stored solutions to these problems in GitHub?
- iamcurious 5y agoThat is my question too. Is it a fancier autocomplete? Or does it reason about code?
- robbedpeter 5y agoIt reasons over the semantic network between tokens, in a feedforward inference pass over the 2k(ish) words or tokens of the prompt. Sometimes that reasoning is superficial and amounts to probabilistic linear relationships, but it can go deeply abstract depending on training material, runtime/inference parameters, and context of the prompt.
- PeterisP 5y agoIn some sense you could think of as a fancy autocomplete which uses not only code but also comments as input, looks up previous solutions for the same problem but (mostly) appropriately replaces the variable names to those that you are using.
- nradov 5y agoThe fact that GPT3 works at all for coding indicates that our programming languages are too low level and force a lot of redundancy (low entropy). From a programmer productivity optimization perspective it should be impossible to reliably predict the next statement. Of course there might be trade offs. Some of that redundancy might be helping maintenance programmers to understand the code.
- hans1729 5y ago>From a programmer productivity optimization perspective it should be impossible to reliably predict the next statement Why? 99.9% of programming being done is composition of trivial logical propositions, in some semantic context. The things we implement are trivial, unless you're thinking about symbolic proofs etc
- tshaddox 5y agoI think that’s precisely the problem the parent commenter is describing.
- alephaleph 5y agoThat would only follow if we were trying to optimize code for brevity, and I have no clue why that would be your top priority.
- nradov 5y agoNot at all. Brevity (or verbosity) is largely orthogonal to level of entropy or redundancy. In principle it ought to be possible to code at a higher level of abstraction while still using understandable names and control flow constructs.
- crubier 5y agoI’m really not sure about that. By definition, high entropy means high information density (information per character). So with the same amount of information you would have less characters.
- pharmakom 5y agoCode is easier to write than read and maintain, so how useful is something that generates pages of 90% correct code?
- ALittleLight 5y agoIt's not useful if you use it to auto complete pages of code. It is useful to see it propose lines, read, and accept its proposals. Sometimes it just saves you a second of typing. Sometimes it makes a suggestion that causes you to update what you wanted to do. Sometimes it proposes useless stuff. On the whole, I really like it and think it's a boon to productivity.