3 ms·
How many % of the time does it produce code that compiles?
by amelius 5y ago
How 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.