It seems like a very sensible answer from copilot since the prompt includes "Q_" which makes it obvious that the programmer is specifically looking for the Quake version of this function. To me it doesn't show that copilot will regurgitate existing code when I don't want it to, just that if I ask it to copy some famous existing code for me it will oblige.
Copilot regurgitating Quake code, including sweary comments
291–300 of 672 posts
Re: Copilot regurgitating Quake code, including sweary comments
#292They have 4 hand picked examples on their homepage: https://copilot.github.com/ One has the issue with form encoding: https://news.ycombinator.com/item?id=27697884 The python example is using floats for currency, in an expense tracking context. The golang one uses a word ("value") for a field name that's been a reserved word since SQL-1999. It will work in popular open source SQL databases, but I believe it would bom…
Copilot appears to be “give more efficiency leverage to the worst kind of coder.”
All the steps in between - looking at the docstring for the function you're calling, googling for more general information, looking at and deciding not to use not-applicable or poorly-written SO answers - get pushed aside. So instead of you having to convince yourself "yes, it's safe to copy-paste these lines from SO, they actually fit my problem" you're presented with magic and I think the burden for rejecting it is going to be higher once it's in your editor than when you're just reading it on a SO post or Github snippet.
Even for a newcomer looking to learn, working on simple stuff that it has great completions for, it seems like it will sabotage your long-term growth, since it takes all the why and the reasoning out of it. Autocomplete for a function name isn't that relevant to gaining a deeper understanding. Knowing why a certain block of code is passed in in a certain style, or needs to be written at all? Probably that is.
Re: Copilot regurgitating Quake code, including sweary comments
#293Earlier quoted context omitted.
Does GitHub Copilot write perfect code? No. GitHub Copilot tries to understand your intent and to generate the best code it can, but the code it suggests may not always work, or even make sense. While we are working hard to make GitHub Copilot better, code suggested by GitHub Copilot should be carefully tested, reviewed, and vetted, like any other code. As the developer, you are always in charge. https://copilot.gith…
> ...may not always work, or even make sense... Naively, as someone who just heard of this - that sounds worse than useless. If you can't trust its output and have to verify every line it produces and that the combination of those lines does what you wanted, surely it's quicker just to write the code yourself?
Re: Copilot regurgitating Quake code, including sweary comments
#294They have 4 hand picked examples on their homepage: https://copilot.github.com/ One has the issue with form encoding: https://news.ycombinator.com/item?id=27697884 The python example is using floats for currency, in an expense tracking context. The golang one uses a word ("value") for a field name that's been a reserved word since SQL-1999. It will work in popular open source SQL databases, but I believe it would bom…
Copilot appears to be “give more efficiency leverage to the worst kind of coder.”
On the upside, think of the consultancy fees you can charge to clean up those messes.
Re: Copilot regurgitating Quake code, including sweary comments
#295They have 4 hand picked examples on their homepage: https://copilot.github.com/ One has the issue with form encoding: https://news.ycombinator.com/item?id=27697884 The python example is using floats for currency, in an expense tracking context. The golang one uses a word ("value") for a field name that's been a reserved word since SQL-1999. It will work in popular open source SQL databases, but I believe it would bom…
As someone who has been coding up address storage and validation for the past week in my current job, that one really made me laugh. Mostly because it tries to simplify all the stuff I have been analyzing and mulling over for a week into a single auto-complete.
Spoiler: The Github Copilot's solution simply won't work. It would barely work for Americanized addresses, but even then not be ideal. Of course trying to internationalize it, this thing isn't even close.
I get what Copilot is trying to do. But at the same time I don't get it. Because from my experience, typing code is the fastest part of my job. I don't really have a problem typing. I spend most of my time thinking about the problem, how to solve it, and considering ramifications of my decisions before ever putting code in the IDE. So Copilot comes around and it autocompletes code for me. But I still have to read what it suggested, making edits to it, and consider if this is solving the problem appropriately. I'm still doing everything I used to do, except it saved me from typing out a block of code initially. I still have to most likely rebuild, edit, or change the function somewhat. So it just saves me from typing that first pass. Well that's the easy part of the job.
I have never had a manager come to me and ask why a project is taking so long where I could answer "it just takes so long to type out the code, i wish I had a copilot that could type it for me". That's why we call it software engineering and not coding. Coding is easy. Software engineering is hard. Github Copilot helps with coding, but doesn't help with Software Engineering.
Re: Copilot regurgitating Quake code, including sweary comments
#296Earlier quoted context omitted.
Actually the indentation of the first comment and the lack of preprocessor show it's not copied from this code directly but from Wikipedia ( https://en.wikipedia.org/wiki/Fast_inverse_square_root#Overv... ) So It could be that the Quake source code is not part of the training set but the Wikipedia version is.
While I strongly doubt they would use Wikipedia as a training set, has anyone done a search of GitHub code to see if other projects have copied-and-pasted that function from Wikipedia into their more-permissive codebases?
https://github.com/search?q=%22evil+floating+point+bit+level...
A question that popped into my head is: if the machine sees the same exact block of code hundreds of times, does that suggest to it that it's more acceptable to regurgitate the entire thing verbatim? Not that this incident is totally 100% ok, but if it was doing this with code that existed in only a single repo that would be much more concerning.
Re: Copilot regurgitating Quake code, including sweary comments
#297Earlier quoted context omitted.
The problem is also stupid people and companies. My last job they wanted me to invoice them hours worked, which was some number like 7.6. This number plays badly when you run it through GST and other things - you get repeaters. So I looked up common practice here, even tried asking finance who just said "be exact", and eventually settled on that below 1 cent fractions I would round up to the nearest cent in my favour…
Well, they did say to be exact, and you handed them approximations, so...
What's notable is clearly no one had actually thought this through at a policy level - the answer was "excel goes brrrr" depending on how they want to add up and subtotal things.
Re: Copilot regurgitating Quake code, including sweary comments
#298So I guess we can just copy around copyrighted source now? Great! Now we can share all the proprietary driver and DSP code from Qualcomm.
Re: Copilot regurgitating Quake code, including sweary comments
#299Earlier quoted context omitted.
It would be viewed as IP theft by most companies to upload private code to this for use by others
It would have to be in the same range of what is suggested, small patches and opt in. If snippets are a legal problem, then Copilot is problematic by default, since it suggests code that may or may not be sourced from free software.
Putting GPL code in proprietary codebase would cause a company massive headaches...
So I agree copilot is problematic by default, liability to lawsuits for employers and forced open sourcing, liability to IP lawsuits as well which will end up on employees shoulders.
Re: Copilot regurgitating Quake code, including sweary comments
#300Earlier quoted context omitted.
And it is completely impossible for the user to do so. So, the tool is worthless if you want to use it legally.
Doubtful. You can be almost certain it’s being widely used or will be widely used shortly. The conversations around copilot are eerily similar to the conversations around the first autocomplete tools