Live data from Hacker News

The Good and the Limitations of Github Copilot

blog.hrithwik.me

81–90 of 144 posts

Re: The Good and the Limitations of Github Copilot

#81

Earlier quoted context omitted.

Hey Chris I am the author. When i made the video I didn't really notice the code part of regex, since I am really new to regex but in the conclusion part of my video I did mention that most of the code is not efficient Your comment was a great learning . Thank you

This is exactly the problem. The regex issue isn’t that it’s not efficient, it’s that it’s wrong. Using this tool to generate code in a problem area you are not qualified to double-check and validate yourself is dangerous.

There's two problems:

1. generating code in the problem area (email address validation) which is pretty much a classic 'things programmers believe about' domain - https://haacked.com/archive/2007/08/21/i-knew-how-to-validat...

2. generating code in a programming idiom with which you are unfamiliar - which regex as a DSL is also a pretty classic example. I don't think most programmers are good at regex, I know I'm definitely in the 'now you have two problems' in the regex camp.

So to summarize it generated code written in a way the programmer could not understand what it even claimed to be doing, using a technology that many programmers are not especially good at; and it generated code that did not handle the problem domain correctly, and the problem domain is one that most programmers don't actually know that well either.

the more I think of this thing the more disastrous it seems.

Re: The Good and the Limitations of Github Copilot

#82
post #69
post #28

Earlier quoted context omitted.

> Using this tool to generate code in a problem area you are not qualified to double-check and validate yourself is dangerous. I would like this message to be amplified as much as possible. Never write code you do not understand. I am excited about copilot, but also wary of the programming culture these tools will bring in. Businesses, especially body-shopping companies will want to deliver as much using tools in thi…

Isn't "Code you don't understand" the definition of AI/ML?

Zing! But well, depends on the algorithm. Some aren't that complicated to understand, like linear regression. Others, like DNN are basically impossible. But with ML you're at least always testing the code you don't understand in the process of training the parameters. That's better than the minimum effort when using copilot code. And many will just make that minimum effort and release untested code they don't understand.

Re: The Good and the Limitations of Github Copilot

#83
post #76

Earlier quoted context omitted.

The only use case you're describing is being able to send spam or sell the user's information to third-parties while preventing the user from identifying that, or from filtering e-mails coming from your service. Those are not legitimate uses.

Being able to notify users, limit erroneously input emails, or cross reference to existing databases (which invariably have the same kind of validation) are legitimate use cases. Even if I have no interest in selling emails, it's still a net benefit if leaked data (e.g. after a breach) isn't full of bob.smith+mycompany@... rather than bob.smith@

> Being able to notify users

Using + emails don't prevent that from happening.

> limit erroneously input emails

BS excuse. That's what email confirmation, confirmation link, smtp inbox validation, etc, are for.

> cross reference to existing databases

Not being able to be cross referenced is a feature for the user, not a bug.

> Even if I have no interest in selling emails, it's still a net benefit if leaked data (e.g. after a breach) isn't full of bob.smith+mycompany@... rather than bob.smith@

It's benefit for the company, not for the user. I'd prefer to know which company leaked my email.

Re: The Good and the Limitations of Github Copilot

#84
post #79
post #59

Earlier quoted context omitted.

Most instances of that should be fixable with some post-processing in Copilot. They could maybe even run py2to3 on it?

I think preprocessing, upgrade the input data before training.

Then you have to trust that not only the original code works, but also the preprocessed upgrade. What could go wrong...

Re: The Good and the Limitations of Github Copilot

#85

A fun issue I keep hitting with Github Copilot in Python is that it's a coin flip whether it will give me a Python 3-style print statement or a Python 2.7 style print statement.

Could Copilot integrate linters? I.e. it doesn't suggest code that doesn't pass lint? That'd get rid of this, at least. I love linters so much...

Re: The Good and the Limitations of Github Copilot

#86
post #69
post #28

Earlier quoted context omitted.

> Using this tool to generate code in a problem area you are not qualified to double-check and validate yourself is dangerous. I would like this message to be amplified as much as possible. Never write code you do not understand. I am excited about copilot, but also wary of the programming culture these tools will bring in. Businesses, especially body-shopping companies will want to deliver as much using tools in thi…

Isn't "Code you don't understand" the definition of AI/ML?

I'd say that's "Code you (should) understand doing things you can't understand (and possibly can't audit)."

The art and practice of programming didn't change much over the last 50 years. 50 years from now, though, it will be utterly unrecognizable.

Re: The Good and the Limitations of Github Copilot

#87
post #71
post #66

Honestly I just ditched the idea of Copilot the moment it spewed out an entire file of copied code. Nice work on making a markov bot with extra steps GitHub. Please, do take my money..

It never did that. It got the license wrong so it wasn't an exact copy...

Until a court decides what it does and doesn't do I'm staying clear

Here's it outputting Quake code, including handy comments it came up with for each line and even an entire line of commented out code. Maybe it decided it was a good choice to comment it out but still include it I guess

Being word for word from the original is just a weird coincidence too

I truly wanted it to be as good as it was sold to us too, but it isn't

https://twitter.com/mitsuhiko/status/1410886329924194309

HN discussion at https://news.ycombinator.com/item?id=27710287

Additionally here's it somehow requesting and using API keys for use in your code https://twitter.com/passcod/status/1410822834272694275

Re: The Good and the Limitations of Github Copilot

#88

A week in and I'm already bored of Copilot submissions... It's not perfect. What do you expect?

There are two types of products: the ones that people complain about and the ones that nobody uses or cares about; based on a famous Bjarne Stroustrup quote.

The fact that people post about it, point out flaws, leave GH out of spite, etc. only goes to show how impactful a system like this can be. It's a big deal, which is why people talk about it.

Re: The Good and the Limitations of Github Copilot

#89
post #83

Earlier quoted context omitted.

Being able to notify users, limit erroneously input emails, or cross reference to existing databases (which invariably have the same kind of validation) are legitimate use cases. Even if I have no interest in selling emails, it's still a net benefit if leaked data (e.g. after a breach) isn't full of bob.smith+mycompany@... rather than bob.smith@

> Being able to notify users Using + emails don't prevent that from happening. > limit erroneously input emails BS excuse. That's what email confirmation, confirmation link, smtp inbox validation, etc, are for. > cross reference to existing databases Not being able to be cross referenced is a feature for the user, not a bug. > Even if I have no interest in selling emails, it's still a net benefit if leaked data (e.g.…

> It's benefit for the company, not for the user.

Yes. Absolutely 100% agree. What I'm arguing is: if you are ready to annoy a tiny fraction of your users, you will get away with a simpler validation, that is better FOR YOU AS A COMPANY, because it has some benefits ranging from shady to just half-shady. This is why companies do this. Not just a small share of them, and not only because developers didn't understand the RFC.

I'm not arguing this is in any way good for end users. I'm saying it can be a good idea despite being horrible towards some users.

You keep arguing from the users' perspective when I'm saying "This is being an asshat to users, but it's worth it." The argument "That's bad for users!" isn't a counterargument to that

Re: The Good and the Limitations of Github Copilot

#90

So does querying Google or Stackoverflow. Looking for “inspiration” should guide you, but you should always be skeptical and not let your brain fall out

The danger is that CoPilot becomes "AutoPilot", because as the author points out, you get used to it way too quickly.

Searching the web still implies extra effort on your side and (hopefully) some scepticism towards the code you find (SO comments, etc.)

Post reply on HN