Live data from Hacker News

The Good and the Limitations of Github Copilot

blog.hrithwik.me

1–10 of 144 posts

Re: The Good and the Limitations of Github Copilot

#2
Controlling the generation for code quality will be extremely hard.

The only thing I see is that they could filter their dataset so that some bad proxy of code quality is taken into account, something like the number of stars (which is clearly a terrible metric, tell me if you think of something else).

The idea would maybe start by training on all of the subset of Github it is ethical and legal to train on, and then filter down to higher code quality towards the end.

Controlling for the time at which the code is emitted would be easier. Something like, retrieving similar contexts, and guiding the model to be more similar to the recent code if there is similar recent code that exists. I'm not sure exactly of how this would be done, but I can see it working.

Re: The Good and the Limitations of Github Copilot

#4

Is === really necessary for Javascript? Type checking seems like overkill?

Depends how much you care about the equality and how strict. by default == will do type coercion so you can get weird results where things like [] == 0 are true.

More equality fun in JS can be seen here: https://dorey.github.io/JavaScript-Equality-Table/

Re: The Good and the Limitations of Github Copilot

#8
> Can help you with Email Validation and API Calls

It generates a nastily complex regular expression that is hopelessly wrong. Visible at https://www.youtube.com/watch?v=9Pw-Roo_duE&t=404, here transcribed:

  /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/
For the local part, it requires [\w-\.]+, which excludes many valid characters like everyone’s favourite, +.

For the domain part, it tries to allow IPv4 addresses as well as normal domain labels (not IPv6 addresses, though), but it ends up tangling it up in a way that a human never would, allowing things like [12.34.56.com], [987.654.321.000, example.com] and example.123], while disallowing things like example.studio (the last label only allowing 2–4 letters) and IDN TLDs (which start with xn-- and must allow hyphen and numbers, not just [a-zA-Z]).

The author makes no comment on how hideously bad it is, which makes me suspect he didn’t notice, which… yeah, shows the problems of the whole thing.

Re: The Good and the Limitations of Github Copilot

#9
post #7

If they are using my code anywhere I expect to be compensated.

If you read the license you put on your project (and/or the GitHub Terms of Service), you wouldn't expect that.

If it’s anything but public domain, there’s probably at least a requirement for credit.

Re: The Good and the Limitations of Github Copilot

#10

> Can help you with Email Validation and API Calls It generates a nastily complex regular expression that is hopelessly wrong. Visible at https://www.youtube.com/watch?v=9Pw-Roo_duE&t=404 , here transcribed: /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/ For the local part, it requires [\w-\.]+, which excludes many valid characters like everyone’s favourite, +.…

Copilot acts like a search engine, you search, you find, then you judge. It was never the case with search engines that you could just copy some code you found without verifying it. Also, it has the same copyright problems as if you used Google to find the code.
Post reply on HN