Hi HN, we've been building GitHub Copilot together with the incredibly talented team at OpenAI for the last year, and we're so excited to be able to show it off today. Hundreds of developers are using it every day internally, and the most common reaction has been the head exploding emoji. If the technical preview goes well, we'll plan to scale this up as a paid product at some point in the future.
What do you think about this being overall detrimental to code quality as it allows people to just blindly accept completions without really understanding the generated code. Similar to copy-and-paste coding. The first example parse_expenses.py uses a float for currency - that seems to be a pretty big error that's being overlooked along with other minor issues around no error handling. I would say the quality of the…
GitHub Copilot
211–220 of 1001 posts
Re: GitHub Copilot
#212Re: GitHub Copilot
#213Should I be impressed that the example parse_expenses.py on the home page doesnt include any error handling and uses a float for currency? This seems like it's going to revolutionize copy and paste programming.
It's a copilot. You're still the pilot. To be honest this seems like it can definitely save me a bunch of googling and let me stay in the ide.
The danger here isn't with experienced developers (this is, obviously, a tool with great potential for productivity). It's with people who just blindly trust what the robot spits out.
Once code like that is implemented in a mission-critical system without discernment, all hell will break loose.
Edit: worth watching this for context https://www.youtube.com/watch?v=ZSRHeXYDLko
Re: GitHub Copilot
#214GitHub Copilot may suggest old or deprecated uses of libraries and languages This raises two questions. - is there a way (right now or planned for the future) for library maintainers to mark suggestions to be removed from the suggestions? I can foresee Copilot being used as a source of 'truth' among less experienced developers, and getting people turning up in the Issues or Discord asking why the suggestion doesn't w…
Re: GitHub Copilot
#215Re: GitHub Copilot
#216Earlier quoted context omitted.
What do you think about this being overall detrimental to code quality as it allows people to just blindly accept completions without really understanding the generated code. Similar to copy-and-paste coding. The first example parse_expenses.py uses a float for currency - that seems to be a pretty big error that's being overlooked along with other minor issues around no error handling. I would say the quality of the…
Why would you say it's an error to use a float for currency? I would imagine it's better to use a float for calculations then round when you need to report a value rather than accumulate a bunch of rounding errors while doing computations.
Re: GitHub Copilot
#217Hi HN, we've been building GitHub Copilot together with the incredibly talented team at OpenAI for the last year, and we're so excited to be able to show it off today. Hundreds of developers are using it every day internally, and the most common reaction has been the head exploding emoji. If the technical preview goes well, we'll plan to scale this up as a paid product at some point in the future.
I visited https://copilot.github.com/ , and I don't know how to feel. Obviously it's a nice achievement, not gonna lie. But I have a feeling it will end up causing more work. e.g. the `averageRuntimeInSeconds` example, I had to spend a bit of time to see if it was actually correct. It has to be, since it's on the front page, but then I realized I'd need to spend time reviewing the AI's code. It's cool as a toy, but I…
Interesting point - it reminds me of the idea that it’s harder to debug code than to write it. Is it also harder to interpret code you didn’t write than to write it?
Re: GitHub Copilot
#218Earlier quoted context omitted.
> If you need to go through the suggested code to ensure it's correct, you may as well write it yourself? Not really. People are generally far faster at reading something and evaluating whether it's correct, than at writing something. In the same way it's faster to read a book than to write one. Not to mention the time it takes typing, fixing typos, etc. So this could genuinely be a huge timesaver if it helpful enoug…
I completely disagree with you. Reading code for correctness is difficult and not something most people do well at all. Reading code and reading for correctness are not the same, and most developers can write code a lot faster than they can verify it.
Honestly I don't even see how that's possible. Writing code, you're thinking about all the different ways to do it, eliminating the ones that won't work, evaluating the pros and cons of the ones that seem like they'll work, you start writing one and then realize it actually won't work, then start writing it a different way, try to decide what the best approach will be to make sure you're not committing an off-by-one error, and so on...
Whereas when you're reading code for correctness, you're just following the logic that's already there. If it works, it works. How could it possibly take longer than the whole creative process of coming up with it...?
Sure, maybe most people don't read code for correctness well. But then the code they write is surely even worse.
Re: GitHub Copilot
#219Earlier quoted context omitted.
I think this would fall under any reasonable definition of fair use. If I read GPL (or proprietary) code as a human I still own code that I later write. If copyright was enforced on the outputs of machine learning models based on all content they were trained on it would be incredibly stifling to innovation. Requiring obtaining legal access to data for training but full ownership of output seems like a sensible middl…
What if I put a licence on my Github-repositories that explicitly forbids the use of my code for machine-learning models?
Re: GitHub Copilot
#220I wonder if there's any potential for Copilot to suggest malicious code because it's been trained on an open source projects containing intentionally malicious code.