Does this solve the right problem? Getting some code on the page has rarely been the expensive part of building something. Indeed, some long-ago experience with code generators suggests that making it easy to create code makes many problems worse down the line.
It's solving 'mechanical' problem. The optimistic twist on this helper is that it just raises the bar - human programmer should better be more useful than 'brainless' code generator - meaning not only being able to write a loop or solve leetcode task, but also understand context and what he's trying to solve for.
As you say typing code is not a bottleneck for problem solving
I agree, I feel like it might be useful for whichever programmers regularly have to search Stackoverflow and then copy paste code snippets.
Then I feel like useful code produced by this tool will have to be treated in the exact same way as a rigorous code review: going through every part of the logic and ensuring it is correct. This seems like just as much or even more work than writing it yourself (if it is written in an unfamiliar way, you might need more time to wrap your head around it).
One of the examples they provide on copilot.github.com shows a unit test for strip_suffix function. It does not test for a file name without a suffix, which the function would fail (it removes the last character instead):
def strip_suffix(filename):
"""
Removes the suffix from a filename
"""
return filename[:filename.rfind('.')]
import unittest
def test_strip_suffix():
"""
Tests for the strip_suffix function
"""
assert strip_suffix('notes.txt') == 'notes'
assert strip_suffix('notes.txt.gz') == 'notes.txt'
Great, you got 2 assertions for free, which lowers some friction of writing tests. You should still be thinking and be "the pilot". When you start writing additional test cases, it will help you out with those too
One should keep in mind that it is just "copy-paste" on steroids (ok, maybe a gallon of steroids), but users should be cautious about the false sense of irresponsibility.
Because just like when they copy-paste the top answer on SO, at the end of the day they are responsible for the code they ship.
The example in the hero animation has a bug. The ${text} may not be correctly URL-encoded, which would make the body invalid. And because this sort of feature encourages people to blindly trust the machine and not think about what they're doing this error is much less likely to be caught.
Personally I think this whole class of feature only offers trivial short-term efficiency gains at the expense of long-term professional development and deeper understanding of your field.
I could see it becoming a liability, and projects may start using the fact that they don't use it as a promo thing in their marketing.
> Choose library.js for your next secure project! > * Military-grade encryption! > * Industry best-practices! > * Extensively-tested codebase! > * No Github Copilot! This seems to me like someone had a cool idea for using GPT and wanted to experiment with it, but then Microsoft threw money at the marketing people and forced it to become a commercial product.
GitHub says you don't need to credit GitHub for any of the code suggestions, but since it's trained on public sources of code, anyone have a clue on potential licensing pitfalls?
(not a lawyer) Copyright issues tend to involve the question of how transformative a work is. This means the code coming out the other end is probably fine. I don't know about the training side, though. Are there license issues in using copyrighted training data without any form of licensing? Typically ML researchers have a pretty free-for-all attitude towards 'if I can find data, I can train models on it.'
From the FAQ at the bottom of the project showcase page[0]:
"GitHub Copilot is a code synthesizer, not a search engine: the vast majority of the code that it suggests is uniquely generated and has never been seen before. We found that about 0.1% of the time, the suggestion may contain some snippets that are verbatim from the training set. Here is an in-depth study[1] on the model’s behavior. Many of these cases happen when you don’t provide sufficient context (in particular, when editing an empty file), or when there is a common, perhaps even universal, solution to the problem. We are building an origin tracker to help detect the rare instances of code that is repeated from the training set, to help you make good real-time decisions about GitHub Copilot’s suggestions." [0] https://copilot.github.com/ [1] https://github.co/copilot-research-recitation
(not a lawyer) my interpretation of GPLv2 is that at the very least the model would be licensed under GPL if it was trained on GPL code. The model is a derivative work. Whether the generated code coming out of the model is GPL is trickier. I would lean towards yes but I'm not entirely sure.
I think talking about exact text matches to existing code is a red herring. If you took GPL code and ran it through an obfuscator that changed every byte of the code to new code, that resulting code would be derivative and would need to be licensed under GPL too. Thank you Microsoft for ushering in a new era of free software.
Comments (1,272) 260 threads
Earlier commentsAs you say typing code is not a bottleneck for problem solving
Then I feel like useful code produced by this tool will have to be treated in the exact same way as a rigorous code review: going through every part of the logic and ensuring it is correct. This seems like just as much or even more work than writing it yourself (if it is written in an unfamiliar way, you might need more time to wrap your head around it).
Because just like when they copy-paste the top answer on SO, at the end of the day they are responsible for the code they ship.
Personally I think this whole class of feature only offers trivial short-term efficiency gains at the expense of long-term professional development and deeper understanding of your field.
> Choose library.js for your next secure project!
> * Military-grade encryption!
> * Industry best-practices!
> * Extensively-tested codebase!
> * No Github Copilot!
This seems to me like someone had a cool idea for using GPT and wanted to experiment with it, but then Microsoft threw money at the marketing people and forced it to become a commercial product.
"GitHub Copilot is a code synthesizer, not a search engine: the vast majority of the code that it suggests is uniquely generated and has never been seen before. We found that about 0.1% of the time, the suggestion may contain some snippets that are verbatim from the training set. Here is an in-depth study[1] on the model’s behavior. Many of these cases happen when you don’t provide sufficient context (in particular, when editing an empty file), or when there is a common, perhaps even universal, solution to the problem. We are building an origin tracker to help detect the rare instances of code that is repeated from the training set, to help you make good real-time decisions about GitHub Copilot’s suggestions."
[0] https://copilot.github.com/
[1] https://github.co/copilot-research-recitation
I think talking about exact text matches to existing code is a red herring. If you took GPL code and ran it through an obfuscator that changed every byte of the code to new code, that resulting code would be derivative and would need to be licensed under GPL too.
Thank you Microsoft for ushering in a new era of free software.
All comments shown.
Couldn't load more comments. Check your connection and try again.