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.
The Good and the Limitations of Github Copilot
41–50 of 144 posts
Re: The Good and the Limitations of Github Copilot
#42A 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.
For me, it sounds like it's closer to dumb copy paste than a smart code generator. AlphaZero wouldn't play a chess move that was against the rules.
Re: The Good and the Limitations of Github Copilot
#43If 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.
Re: The Good and the Limitations of Github Copilot
#44Is === really necessary for Javascript? Type checking seems like overkill?
a == !a There’s several values of a where that yields true (of the top of my head, a = '0' is one of them). Yes, you do need ===.
You need to learn the Six Falsey Things In JavaScript. Everything else when cast to boolean will be true. These six things are What and Why and When And How And Where and Who. Wait, no, that's a totally different list of six... anyways
false
undefined
null
NaN
0
"" (empty string)
That's it. Since '0' is neither when the negate operator casts it to boolean it'll become true. And then negating it becomes false. When doing a comparison between '0' and false, the standard says https://262.ecma-international.org/5.1/#sec-11.9.3
> If Type(y) is Boolean, return the result of the comparison x == ToNumber(y).
ToNumber(false) is of course 0. So you are running '0' == 0 which is visibly true...
Re: The Good and the Limitations of Github Copilot
#45I wonder how much worse or better simply automating a stackexchange search and pasting the results is...
Re: The Good and the Limitations of Github Copilot
#46Earlier 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.
Re: The Good and the Limitations of Github Copilot
#47Re: The Good and the Limitations of Github Copilot
#48Re: The Good and the Limitations of Github Copilot
#49> 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, +.…
This has been discussed at length several times before and the answer to why you use a regex like that to validate emails is because you aren't trying to validate against a standard, but against a subset of email formats. You want a "normal" simple email. No "+" domains etc. Because it doesn't matter if you annoy the 0.01% of your users that would be negatively affected by that, it's better to have their simple/canon…
Re: The Good and the Limitations of Github Copilot
#50I wonder how much worse or better simply automating a stackexchange search and pasting the results is...
Searching SO and converting the highest rated answer's code that doesn't syntax error to a Python module is about 150 LoC[0]. [0]: https://github.com/drathier/stack-overflow-import