Programmers are fine when their creations, pretty much all of tech, resells content that other people wrote for free, but no, not code, that one must be expensive
I also don't think it's acceptable for TurnItIn to monetize content without paying the authors. My opinion about whether students should have their work stolen and monetized by a company doesn't seem to have much impact though.
We stand on the shoulders of giants. That had been the way for decades. A newer stack over the older one without much thought. And someone in the future will build even a newer stack over the current ones.
If GitHub could guarantee that the code Copilot had ingested was only made with OSS licenses, then I don't see what the problem is.
But as far as I understand, GitHub trained Copilot on any public repository on GitHub, meaning even if it doesn't have a license specified (so the user publishing it still has the copyright to it), then I don't see how it can be OK.
It is hard to see how verifying licenses is a solvable problem, when licensing for code dependencies can be transitive. For ex - if I copy code from a GPL codebase like Linux and create a Github repository with an MIT license.
Sorry, to be clear, I meant even if a Github user asserts their code is public-domain/no-attribution/unlicensed, they could have lifted it off a codebase that doesn't allow it. It would be tricky for Github to establish the code was indeed original and hence their agreement with the user allows them to train their models on it.
> they could have lifted it off a codebase that doesn't allow it
Ah. But then someone else is guilty of redistributing code without permission.
But you're suggesting, GitHub should implement something like ContentID but for code. Which should be cheaper (since code is cheap to analyze, while videos are much more bandwidth-intense). And this would kill two birds with one stone.
> I checked if it had code I had written at my previous employer that has a license allowing its use only for free games and requiring attaching the license.
yeah it does
That's a pretty bad example. He prompted it using the exact function header taken from the code he is complaining about.
It'd be much more interesting if he setup a function that was doing a similar thing but with different parameter types and names, and a different order of parameters (ie, like a real problem).
Does that matter? A code provided should be provided with the license needed to use the code, otherwise the user is opening themselves up to litigation.
Hence why I agree with another comment somewhere that Microsoft is banking on software developers not litigating about use of their open source code in closed source projects.
I can’t say I remember the terms saying anything to the effect of granting Microsoft a perpetual unlimited license in addition to whatever license I package with the code when I signed up. Not doubting it, but I would have expected that to raise some suspicion long before Copilot was around.
It could be something as innocuous as "you allow your code to be analyzed, processed or otherwise handled by Github software" I suppose, which wouldn't raise suspicion.
No, it doesn't do any of that. However, it does not "copy code" except in marginal use cases, the far more common scenario is that it will suggest you very basic code that is akin to a Stack Overflow reply.
I read a lot of open source code and might subconsciously absorb techniques and patterns that are common. When I write code I might be influenced by what I read, not line per line, but rather generally.
Kinda, but I think you are imagining something bigger than it is. At least in my experience, it works well for simple stuff like "iterate over x and extract y" or similar queries that I imagine are well represented in its training data. When you get to very specific functions, its answer will be less reliable and more likely to be a wonky rehash of the few examples it has for that case.
I disagree. Copilot is selling content-aware code suggestions, which is a result of code that other people wrote in their platform, and which in no way affects the work of these people.
I get the feeling this entire debate would have been non-existent had this been a Jetbrains product instead.
The whole thing is just bizarre when the vast majority of developers constantly look at OSS code daily and lift ideas/patterns/snippets from there regularly without once looking at whatever license is attached.
So when you google a problem and it leads you to a code snippet that solves it that just happens to be OSS, you immediately scrub your brain and pretend you never saw it and instead instead come up with your own completely independent solution after the fact?
Google usage is outright forbidden for work in institutions that care about intellectual property rights, so the brain scrub issue is just arguing at the wrong level.
If you're googling solutions around you're already not taking intellectual property seriously enough to care about what happens after you lift ideas around.
Can you name these institutions? I am surprised to hear that some institutions would prevent devs from viewing e.g. documentation of the APIs they are using or academic papers about algorithms for computing the multiplicative inverses of 64-bit integers, if they accessed those things via google
This is interesting. Is the internet completely cut off? Do they have internal libraries of documentation for third party stuff they are using (paper? digital?) Do you have any example institutions, or what domain they are working in? Thanks.
A concern, which I think is legit, is that it is quite easy for someone with a strong presence in search, web advertising, analytics and mobile to puzzle together what a company is investing in based on the aggregated research and web access from known locations
Maybe I live in a bubble, but the likes of Google/StackOverflow have been part and parcel of a developers toolbox for many years now.
And in any case I wonder how that is enforced. Eg, Someone goes home in the evening and visits github, learns a new trick and comes into the office the next day and implements it.
> I get the feeling this entire debate would have been non-existent had this been a Jetbrains product instead.
why so?
> The whole thing is just bizarre when the vast majority of developers constantly look at OSS code daily and lift ideas/patterns/snippets from there regularly without once looking at whatever license is attached.
well, yes, copying an idea or pattern is generally.. accepted, to be kosher. copy-pasting too, in small amounts (a function, a type). that said, i would (and have) attribute even a notional similarity when writing something open source.
i don’t think co-pilot even allows the user to find where the code came from.
I am not a lawyer, but my legal intuition / common sense says that “code snippets” are not copyrightable. There’s some sliding scale on when a code snippet would become so non-trivial that a reasonable (!) judge would consider it copyrightable, but nothing Copilot does is anywhere close to that limit, IMO.
One of the main claims in Google LLC v. Oracle America [0], was based around a 9-line rangeCheck function. Whilst some code can be too simple and small to copyright, programmers and lawyers are probably not going to view snippets the same way. Copilot creates risk.
This does raise a point - do we now have to assume that all those services that provide free hosting/access/service to open source projects will be strip-mining the work of the open source community to sell them back to us all? I almost feel stupid believing it was an altruistic move to contribute back to the shoulders of giants they were already standing on...
I feel scammed too. At this point it should be obvious, but I’m finally savvy to the fact that every tech company that offers anything free, and you use it to create “your” content, is not your friend and you don’t even own the works you host with them. I feel scammed that GitHub was cool about 10 years ago. It was like the professional/cultural center of gravity in my career. GitHubbers we’re cool people. Everyone cool hosted their site on GitHub Pages. I didn’t want to see a resume; what’s your GitHub? Now I feel stupid for having contributed whatever tiny bit of brains I did to this AI by thinking that I was using the cool, developer-first code website.
No. You still have the option not to buy Copilot and still use GitHub's services for free on public projects. Or, if you're not comfortable with your open source code being perused by an AI, you can set up your own privately hosted public Git repo pretty easily.
I honestly don't understand the general outrage at this fair seeming deal to me.
If you assigned a task to a junior dev, and he/she used some code from open source projects and Stack Overflow to develop a custom program for the task, would you say that this person is selling you other people's code? Is it common or expected for this type of use to be acknowledged?
People I've worked with have different philosophies on this, but personally, if you check in code that is distinctive enough that I can identify the source you copied and pasted it from, and you provided no indication (whether in a comment or a PR description) that you copied it, I will really get quite grumpy at you about it.
Way too often I burn half an hour needlessly during review in one of two ways:
* trying to figure out how the heck someone figured out some "magic" code that achieves something by invoking a bunch of poorly documented library or framework internals, and trying to reverse engineer WTF all the magic does by diving into the framework's source... only to eventually think to google the whole snippet rather than each individual method call, and discover it's copied from a Stack Overflow answer
* trying to figure out why something was written in an unidiomatic or overcomplicated way rather than a more obvious approach, and commenting at length on how I'd simplify it... only to eventually realise it was copied from a Stack Overflow answer
Attribution isn't just about making sure the right person gets credit, or about license compliance; reviewers and maintainers frequently need to be able to see where stuff was copied and pasted from in order to do their jobs effectively, even for snippets of just a few lines.
I understand where you are coming from. However, I think you are making the assumption that this person simply copy/pasted some code with no understanding of it, or that this code is then very different from your codebase and needs to be refactored. If using Stack Overflow did not add to your overall development time but subtracted from it, because it was used as an appropriate piece of a much bigger puzzle - a far more realistic scenario for both Copilot and our general use of SO -, then I see no issue with it whatsoever. Certainly no moral or copyright issues as this person on Twitter implies.
No copyright issues in the sense that no entity is likely to ever pursue the matter, sure. But copying and commercially using someone else's nontrivial bit of code that doesn't have a license that says you can is quite blatantly a copyright violation.
If I found out a junior dev had been copying copy-left or proprietary code then I'd have to rip out that code, have a chat with them and figure out what to do from there. Even if the code isn't copy-left it's still someone else's code, sometimes that's ok but sometimes it's definitely not.
If the solution was made up of ideas from OSS and snippets from Stack Overflow? No; that's fine.
If the solution was copied from an OSS project without proper attribution? Yes. Absolutely. And they'd have words with a senior dev and maybe even legal if the code they copied made its way into production without attribution.
Many copyleft OSS licenses require attribution and distribution of derivative works that we wouldn't allow.
It depends on the source of that code and the expected license of the code you paid them for. If everything is MIT/BSD (and attributed), no problem. If the code was GPL and I’m making a commercial product, we have an issue.
I’d also expect for any stack overflow code to include a comment with a link to the stack overflow page.
I think one of the key points is to make sure any code taken from another source is cited appropriately. If it isn’t, or the junior dev is passing it off as their own work, then we have problems.
This is a good thought exercise. I wouldn't call it stealing, though I am not sure how legal liability is assessed, say if they picked up GPL code unknown to the company, and the company is later sued over it.
This isn't derived from principled reasoning, but I think of it as similar to community norms. Not the best example, but you wouldn't mind someone subletting their homes to Airbnb, but if all of your apartment complex does it, it invites regulation. A product like copilot enables copying code (even if inspired, and not verbatim) at a scale that individual developers can't. So respecting software licenses needs to be codified (legally?) while previously it was left unmonitored.
Could you elaborate on why you think a computer program and a person should be treated the same way in this respect?
We can take as self-evident that a human is capable of reading about something, conceptualising it, and then writing something completely new with the knowledge they have gained.
I think it's also pretty uncontroversial that the primitive "AI" we currently have is nowhere near the level of even an average human at these things, and thus we can't just blindly assume it is conceptualising rather than copying. Copilot regularly produces verbatim copies of existing code when working on non-trivial things.
Forget about the "AI" label: Copilot is just a complex computer program, that takes code from other people and inserts various permutations of it into your editor, whilst ignoring the license of that code.
I think it's best if we sidestep these big conceptual questions about what cognition or creativity really are. It's hard to find agreement, and perhaps it is not necessary to do so.
My position is that if a person hired in a company can currently use Google, Stack Overflow and GitHub to help develop their custom scripts, and no moral or copyright issues are infringed (ie, you don't try to say you came up with it on your own, and you use only enough that it is clearly fair use), then I think an AI should be able to assist in that task. There is no need to complicate things by legislating what the AI is doing and what Google is doing, as they are very similar things and in fact even use similar methods.
You are saying that the AI should be treated the same way as a person would regarding its 'output'. I disagree. This is a conceptual disagreement and you cannot just sweep under the rug "what cognition or creativity really are".
At the end, when in several (2-5) years we start seeing structural unemployment emerging because of AI deployments, this will be resolved by the legal system, most likely by some sort of partial prohibition of training/monetizing such systems.
I think I still have not understood your argument. Are you saying that you are afraid that AIs will become too powerful and cause unemployment, and therefore we should regulate them now before they do so?
Many people are worried about this, which is why there is a lot of debate about minimum income programs. However, at present, what Copilot is doing is similar to what Google does, and it is certainly not going to replace devs any time soon. Personally, I think we should exploit technology to its fullest, and the only reason we can have this conversation is because in the past, we haven't given too much consideration about the mailmen, secretaries, delivery workers and everyone else who got displaced by our use of the internet and similar technologies. We merely adapted to better exploit them.
I am not saying (in that last comment) what should happen, I am saying what will happen.
Past automation in terms of impact is nothing compared to what's coming and people and lawmakers will react accordingly - not in favor of the automators.
I would agree with you if the AI was genuinely assisting with that task, but it isn't.
It's taking inputs, ignoring their licenses, permuting them in ways that are not understandable to the user, and then outputting them.
That's an entirely different task than the user reading SO or using Google and then writing their own code, because the "AI" is not capable of writing its own code at that level.
Relying on this tool means ignoring the license of code that you're copying, without even knowing that you're doing it.
> That's an entirely different task than the user reading SO or using Google and then writing their own code, because the "AI" is not capable of writing its own code at that level.
I would say it's a very similar task. If I need to remember how to use a certain function, I can Google for documentation and examples, or I can tell Copilot what I want to do. The fact that the solution was presented by Copilot or a SO thread is, in my view, irrelevant. And to compound on that, I doubt anyone checking SO truly knows where that answer came from. The person could simply be reproducing a snippet from somebody else, you have no way of knowing if it was licensed.
I don't think this is bad either. Even our current shitty copyright laws protect that kind of use. I shouldn't have to worry whether my little prime number generator uses an algorithm first created by John Carmack or Microsoft. Programming has evolved rapidly in great part because we can all use other people's work and use it to improve ours. Of course you shouldn't just copy and paste everything and call it a day, but that's hardly what Copilot enables anyway.
You really seem to be ignoring the core issue by focusing on SO though. Everything on SO is fair game, but code on GitHub is under a variety of licenses, and when Copilot regurgitates it, no matter how complex and inscrutable the process is that leads it to do so, it may be causing the user of Copilot to misuse that code because it doesn't even give them the opportunity to know where it came from or what license it was released to the public under.
> Do you go and check whether a given reply belongs to a licensed project?
All SO questions, answers and comments are CC BY-SA. The terms of the site say that anyone submitting this content agrees that it's licensed that way, and when you visit the site you agree that you are provided with the content under that license. It's not necessary for you to check whether the submitter had the right to offer it under that license; that's their problem. The same goes for any content offered to you under a given license on any platform. I don't understand what your question has to do with the conversation.
The problem with Copilot, and I really can't believe this has to be restated over and over again, is that it takes code from projects with various licenses, and outputs it in your editor in various transformed-or-not-transformed ways (the fact that the transformation is extremely complex doesn't change anything), and gives you no way to know where the code came from, how it was licensed or how it has been transformed. So, despite the fact that if you use it enough you are virtually guaranteed to use code in contravention of its license, you cannot even know which projects you have stolen code from or which licenses' terms you are breaking.
> Also, please consider that there is a toggle that allows you to block Copilot from using public code.
Great. I'm sure its utility doesn't go down at all if you turn that toggle off...
> All SO questions, answers and comments are CC BY-SA. The terms of the site say that anyone submitting this content agrees that it's licensed that way, and when you visit the site you agree that you are provided with the content under that license.
Have you ever read GitHub's conditions to know whether they also have the right to use your code that way, no matter how you decide to license it? I feel that you are overly focused on the legal part here, which I'm sure was handled by Microsoft's lawyers. I'm more interested in the question of principle.
No matter what the terms of use at SO say, anyone can give you an answer that is a copy of some code they don't own. You may consider that immoral, but I don't, not at the scope SO is used for. In addition, the vast majority of cases at SO and Copilot are not about complex functions being stolen, it's about some dumb code you would have found in 2 minutes of googling. What I'm trying to argue here is that if we are all cool with SO and think it's useful, there is no fundamental difference here. We never cared too much about licenses for boilerplate code, and I think we shouldn't start now.
> Have you ever read GitHub's conditions to know whether they also have the right to use your code that way, no matter how you decide to license it? I feel that you are overly focused on the legal part here, which I'm sure was handled by Microsoft's lawyers. I'm more interested in the question of principle.
I have, and there is not. Neither could there be — in many cases the person uploading code to GitHub is not the copyright holder — they are just doing something permitted under the license — and for a large open source project there could be thousands of copyright holders. A random person mirroring some source code to GitHub is in no position to negotiate different license terms on behalf of the copyright holder(s).
> No matter what the terms of use at SO say, anyone can give you an answer that is a copy of some code they don't own. You may consider that immoral, but I don't, not at the scope SO is used for. In addition, the vast majority of cases at SO and Copilot are not about complex functions being stolen, it's about some dumb code you would have found in 2 minutes of googling. What I'm trying to argue here is that if we are all cool with SO and think it's useful, there is no fundamental difference here. We never cared too much about licenses for boilerplate code, and I think we shouldn't start now.
I don't understand why you think a person writing an answer on SO and a computer program outputting some permutation of its inputs into your editor are the same thing. The person writing an SO answer is intelligent and capable of conceptual understanding, the computer regurgitating code without regard to its license is not.
>> Have you ever read GitHub's conditions to know whether they also have the right to use your code that way, no matter how you decide to license it?
> I have, and there is not.
At least one IP lawyer strongly disagrees, suggesting anything you host on GitHub is fair game [1].
> The person writing an SO answer is intelligent and capable of conceptual understanding, the computer regurgitating code without regard to its license is not.
From a copyright perspective, that is irrelevant. In fact I would think Copilot has more incentives to not infringe than a random SO user, who is very unlikely to be sued. I already argued in another post that in my view, from any perspective, it is also irrelevant whether it's a person or AI doing the same work Copilot does.
> At least one IP lawyer strongly disagrees, suggesting anything you host on GitHub is fair game [1].
The question is whether Copilot's users can use the regurgitated code without following the license terms, not whether Copilot was allowed to train their model on it. I agree it's likely fine for them to train the model, but the use of Copilot would seem to be a legal minefield.
A little thought makes it clear that an affirmative answer would be absurd. This would mean that using a simple tool (let's say `cat`) to make a copy of some code and subsequently ignoring its license terms is infringement, but if the software used to make the copy is more complex (or perhaps if it has the "AI" label stuck to it!) the same actions are not infringement.
If I make a script and train it on Windows source code do you think MS will like it if I use that script on Wine ? I am sure MS will say the license did not allows it and your script transformations are not original, so GPL or similar license should be respected by Microsoft too.
>My position is that if a person hired in a company can currently use Google, Stack Overflow and GitHub to help develop their custom scripts, and no moral or copyright issues are infringed (ie, you don't try to say you came up with it on your own, and you use only enough that it is clearly fair use),
Only a judge will determine if it is actually free use, if you by change copied some super clever and unique code into your code base then I am sure a judge will not say it is fair use, copilot was proven it will do this(though MS said they put some IF-ELSE checks in the AI to prevent the plagiarism to be detected by removing obvious results and maybe obfuscating stuff more).
Maybe Stack Overflow license allows you to copy paste the answers in your code, but GitHub code has repo specific license that you need to respect.
If MS trained the model on all their private repos too and made the model free software then many would not have this issues. Or keep the model proprietary and train it only on the MS repors, BSD and similar licensed repos.
Copilot understands concepts as well as may humans. You can see primitive versions of this in the old Word2Vec demos showing how those models understand how London:England ~= Paris:France
Copilot is much more sophisticated than that, and it no more copies code than a human does. It generates on a character by character basis given the contextual probability of the next character conditioned on the previous set of tokens with the "heat" being a factor how how randomly it will choose characters.
This is much more similar to how a human writes than "copying".
"it no more copies code than a human does" < that's a very big call right there, considering how much verbatim copying has already been documented in Copilot. The primitive understanding Copilot has of what it is generating doesn't even approach that of the most average programmers. It's classic AI: impressive on the surface.
All the "copied code" I've seen is where the person prompts it with a large amount of very unique preamble and then it fills in the exact example they are quoting from.
Try it without doing that.
And it's weird people think it can't understand conceptual relationships. Word2Vec demonstrated that nearly 10 years ago and that's a much weaker model in terms of both size and techniques than this is.
> And it's weird people think it can't understand conceptual relationships. Word2Vec demonstrated that nearly 10 years ago and that's a much weaker model in terms of both size and techniques than this is.
Saying that Word2Vec or Copilot have "understanding" of their input requires a redefinition of the word "understanding".
No matter how complex a program is, and no matter whether it uses techniques sometimes described as "AI" in its implementation, it's not a person. Copilot is just a very complex pipeline from other people's code to your editor, which ignores the license of those other people's code.
About 10 years ago or so, I was working at a certain place. They put me into a small team apparently focused on some R+D project under the direction of an "architect".
Basically, the project was to package Cordova + Backbone + Marionette, plus a couple of tools, under their own commercial name. Then they'd go around potential clients presenting it as the perfect solution to build hybrid applications for web/mobile/smartTV/whatever.
A certain Monday, the "architect" arrived boasting. He did that often, but this time he was more boastful. He explained that he had spent the whole weekend coding. He had written an incredible tool that would create a skeleton for a project from zero. You would type something like `tool create` and it would create the whole project with all the scripts and some example views and whatnot.
It was Yeoman's yo CLI tool, of course. He had just changed the copyright in the comments, removed most of the comments, he had deleted any mention to yeoman or the original creators, changed the name of the executable script and that's it.
The whole thing was OS code picked up from various repos and packaged as their own. The company used it to sell development projects. The so-called-architect used it to sell himself inside the company and then jump away into a startup as CTO.
Is this common or is it just anecdata? I don't know. It's clearly not the only time I've seen something like this and I do know that in certain companies around here it isn't exactly uncommon. But I can't say how common or uncommon it is.
Would I call this "selling other people's code"? Yes, I would.
It’s the same problem with those ML models, the other day someone generated a children’s book using GPT3, turned out that there is a real children's book with the same name and a very similar content: The Very Lonely Firefly by Eric Carle.
Other thing I'm worried about: how to retract facts from ML model? I guess it's impossible, you need to retrain from scratch with part X removed from training set. Or... people could invent layered ML models similar to docker - each layer would be marked what data it was trained with. Then at least you'd have some cache of trained model to re-use in next training session. Nasty stuff.
Or instead of inventing complicated layered ML models Github could just use each repo's license information to decide what's okay to use. Detecting licenses is already a feature on that site.
Interesting, it's a big question I've had for a while, how 'original' stuff coming from these AI systems is, and also the distribution of uniqueness over many answers. I haven't dived into it yet, but I find it surprising how little this comes up when these systems are discussed (ie here on HN).
Does anyone even know? Can we even check? What if 1 in a thousand, or one in a million outputs is (very close to) something existing? I find this especially relevant when generating faces.
I mean, if it's autocompleting a fairly simple line, and can do that because it's analysed a lot of lines, I don't really see that as "stealing anything".
If you are using it to write whole complex functions thatare the same as other people's, I guess that is copying.
But if you do the second thing you are not a great dev, and would have probably ended up copy pasting it anyway.
I think the first use case is far more common, and creating boilerplate that is so generic you could never really attribute it anyway.
It changes the code for use. I'm not sure it can be considered a copy. It much like reading someone else's code and drawing ideas and patterns from that code.
If I pay for grammarly, and it plagiarizes an existing work but represents it as an entirely new, independent work and I am unaware of the existing work that is being stolen, who is doing the stealing?
This makes more sense for text message auto complete: you just take the suggested next word after a one word start deed, it might reproduce a Wikipedia entry. But what did tub expect? The same would be true with grammarly if you somehow got it to produce a bunch of new text. You expected garbage, but somehow infringed on copyright instead. But I guess think the user deserves some responsibility in realizing their expected garbage output isn’t for some reason.
If you pay a shady character to get you a modern laptop for $100 you can't claim that you were unaware that it was most likely stolen and the fact that you paid for it something doesn't absolve you morally.
So it's my job to check my supplier, to make sure lines from co-pilot are legit.
At the same time when fast fashion companies sell T-shirts made with slave labour, its not the company's responsebility to check what their suppliers are doing.
And if tesla autopilot kills you and your family its not their fault either.
Neoliberal morality - companies are never accountable for anything, it's heresy to suggest they should do their job properly.
Other than the first sentence nothing you wrote is true. If a company doesn’t do due diligence on their suppliers they face fines and possibly criminal charges. The news came out the other day that the NTSB is considering whether to require Tesla to recall all their vehicles with self driving enabled. Companies of all types face huge fines and civil liability for product safety issues.
>If Copilot does it for you, it's GitHub's/Microsoft's responsibility.
GitHub/Microsoft says that it's still your responsibility.
>You should take the same precautions as you would with any code you write that uses material you did not independently originate. These include rigorous testing, IP scanning, and checking for security vulnerabilities. You should make sure your IDE or editor does not automatically compile or run generated code before you review it.
I'm not really sure how am I supposed to go about validating that I can in fact use this code that the magical black box barfed into my IDE using a bunch of different weights.
Let MS buy BlackDuck scanner and integrate in to GitHub/CoPilot. They could then suggest code and also scan it for any license violations, and give you both sides of the equation in the same tool.
You are responsible for your tool use. That's the same discussion as with whether uTorrent is responsible for your torrenting copyrighted stuff or with Tesla's auto-pilot. You buy the tool, you are responsible for what you create with the tool.
True, however, the users have been liable too. If my company gets sued because I used Copilot, it won't matter that much that the plaintiff also sued GitHub/Microsoft.
> If you are using it to write whole complex functions thatare the same as other people's, I guess that is copying.
> But if you do the second thing you are not a great dev, and would have probably ended up copy pasting it anyway.
How would I know that the boiler plate I ask copilot to write for me is copied verbertim from a codebase, that neither I nor Microsoft has licensed to use?
I was talking more about ethics than the law. I try to live adjacent to the law (to an extent that is reasonable and sane) in all fairness, as it will never be in-line with my ethics.
I neither see it "stealing". The neuronal network was trained with code as input. It's creating code as output. The output has nothing to do with the input once it is trained. Do people dont know how neuronal network work?
It's like saying GPT-3 created text is copyright infringement, because some author used the same sentence in a book before.
1) Copilot is not designed to output the source code for a project source file
2) It does not re-create the whole source code, just parts of it (sentences, not chapters)
3) The source code license, e.g. BSD, works on "the code" - copying a line like "void main(void) {" will not trigger it, obviously
My problem is with the weights not being released. They are a derivative work of open source code in the most literal sense. The weights would not exist without those lines. Gradient descent is using literal derivatives.
Seems like a narrow vision. Is every line of code you write to solve a problem “not boring”? I solve problems I find interesting, but writing matplotlib code to visualize data never is.
This is true for the current iteration of the model. Probably won't be true at least to an extent in 5 years.
Besides, there is nothing wrong with solving boring problems. Not everyone can be Bjarne Stroustrup.
The most interesting problem will have extremely boring bits. If you write a cli tool to solve all of world problems by changeling magic, you'll still need to add the parameter handling and do some error management. Which is repetitive and likely well generalised and predictable based on other projects.
The problem may not be boring. Typing boilerplate code is.
I work on games as hobby. Sometimes I implement mechanics requiring vector math. Working on mechanics is interesting. Writing down math is not. Copilot helps with later.
Then another hypothesis: you probably haven't found the right tools for it yet. I find myself writing biolerplate mostly around some obscure system framework calls (iOS/macOS), but that's rather rare. But even OS API's and frameworks do evolve over time into requiring less boilerplate. Just take the evolution of CoreAudio, the modern Swift interface is so much better. So at the end of the day it's about the tools and interfaces: boilerplate is rarely absolutely necessary with the right tools.
That’s not how you use Copilot, any more than it’s how you’d use any other autocomplete tool. I don’t know why so many people seem to think that using Copilot is just closing your eyes, hitting tab fifty times, and then committing.
You work on your code, Copilot makes a suggestion. You read that suggestion and verify that it’s close to what you were already going to do. If it is, you hit tab, then you tweak it. There’s nothing blind about this process.
I disagree. Most large projects, software or otherwise, use existing parts. If you design an innovative device you'll still use some standard components like chips, memory modules etc.
There's already a way to quickly solve the boring parts in development - libraries which were built and licensed around that purpose. But Copilot passes you code of unknown origin, with unknown license terms and no information about how close it is to an existing codebase. It's like a person trying to sell you Macbooks for a hundred bucks per unit but you don't know where they came from and who made the holiday photos stored on the harddrive.
99% of the "problems" I'm solving when I'm working even on very interesting and challenging problems, are boring subproblems. If I can get those out of the way then that would be great.
That hypothesis is easily disproven by spending an afternoon on a side project with Copilot.
No matter how interesting your problem is, translating it into code is going to involve a lot of grunt work. This isn’t just boilerplate, but also the large portion of your code which is going to be gluing things together.
The time you spend working through those menial parts of your code is time when the context of the interesting part of the problem fades. Once you get the mechanical stuff out of the way, you have to load the interesting stuff back into your brain.
This is where AI coding tools really shine. They dramatically reduce the intervals between when you can think about the actual problem you’re solving by letting you get the boring mechanics out of the way more quickly.
I'm very curious to see some examples where Copilot autocompleted something truly useful and saved you time - and that also disproves my hypothesis that you are doing something boring or with the wrong tools/languages/frameworks. Things that a non-ML autocomplete could do don't count.
I can give you an example of an entire (well, I still consider it alpha) library I wrote several months ago, using Copilot: https://github.com/osuushi/triangulate
This is an implementation of a 1991 paper on polygon triangulation into Go. So the deepest thinking about how to solve the problem was obviously already done for me, but there were a number of edge cases that I had to invent my own solutions to, and the translation itself involved keeping a lot of context in my head.
I can’t tell you in precise detail what Copilot did, and what I wrote by hand. I wasn’t taking notes or recording my screen. But there’s a reason you don’t see a lot of blocks in there where I forgot to comment anything, because my entire process for this was “type what I want to do in English, and see if Copilot will generate the next snippet, or something close”. I didn’t do this out of bloodyminded dedication to the AI cause, but because it continued to be an extremely effective way to get the code written quickly.
I can give a few specifics:
- My linear algebra is rusty, and Copilot was extremely helpful here. I would often just type the basic thing I was trying to do in pretty vague linear algebra terms, and it would generate the formula.
- I wrote a lot of tests like this https://github.com/osuushi/triangulate/blob/main/internal/sp.... This is a minor thing, but those aren’t copy-pasted. Instead, I would write the first test, and for the most part, I could just type something like `func TestConvertToMonotones_SquareWithHole`, and it would figure out how to adapt the previous test automatically.
- It generates exactly the error strings I want based on context an enormous percentage of the time.
I want to stress that I’m just giving a few examples of things that I specifically remember because I talked about them at the time, not characterizing the majority of the experience of using Copilot. The majority of the experience of using Copilot is that you write comments, and then the things you were about to type appear on the screen before you have to type them.
When I find myself writing comments of this style I see, I usually ask myself if this thing would be better extracted into a function. These comments are primarily stating the obvious.
If I find myself writing a 200 line function with nested or repetitive loops I expect to hear from colleagues about how I should refactor it.
I feel that the solution to writing boring, repetitive boilerplate shouldn’t be to automate writing more of it, but to reduce or remove it entirely. Seeing things like this just reinforces my preconception that Copilot acts in low quality code environments to produce fittingly low quality code, or with languages like Java where the language is married to boilerplate.
GitHub Copilot is a paid feature, but that's a red herring in this discussion - people are free to monetize free software, neither or the major licenses forbid this.
GitGub Copilot is an advanced autocomplete / code generation system, based on a machine learning model. The code used for training the model is taken from projects hosted on GitHub. These projects were published under different licenses.
The main questions are:
Some of the licenses need something from you if you create a derivative work. Does the Copilot training itself count as creating a derivative work?
Sometimes the autocomplete basically quotes the original code. Does the original license then apply to the autocompleted / generated code too? How much of verbatim code quoting does it need for the result to be considered a derivative work?
Those instances where people demonstrate verbatim copies, are mostly either well known snippets which have been copied a million times already, or obvious completions of a partial verbatim piece of the supposedly copied code that any coder could extrapolate.
They have been the same for most of history. People could openly copy titles, plots, parts, phrases, etc from prior work. Same for mechanical designs. The only thing preventing them was obscurity (e.g. the inventor trying to make it hidden) not any law or ethical idea that it's bad (there wasn't any). That's how things from math to gears to tunes got better (or changed over time, in the case of art, as better/worse is subjective there).
E.g. globally and historically folk music has been basically taking whatever you want from tunes and songs where everybody does the same with no "permission" asked or needed to be given.
Like 4 verses but want to add a fifth or change some part? Go ahead. Want to play it exactly like you've heard it? Go ahead again.
The idea of "theft" in that regard came in the last 2 or so centuries, and was enforced with artificial legal barriers and new "ethical" concepts that are neither "natural", not present for the vast majority of history (including golden ages of art production).
>because nobody gives a sht about art created by AIs. And nobody will.*
You'd be surprised. Especially if people don't care/are told/whether it's "created by AI or not".
Whether in "high art" or lowly pop, "generative music" (and fine art) has long been a thing. And people do attach to it (e.g. to Brian Eno's generative works made by rule based systems he programs).
No, I will not be surprised. Outliers are outliers.
"Art" created by AIs will just have price (and cost) of ~0 and, like everything that has a price/cost of 0, nobody will give a sh*t about it. The only real question is how will human artists (provided they exist in your preferred dystopia) will prove that they have created something themselves.
>No, I will not be surprised. Outliers are outliers. "Art" created by AIs will just have price (and cost) of ~0 and, like everything that has a price/cost of 0, nobody will give a sht about it.*
Art doesn't touch people because it has cost.
In fact, for ages certain types of art had no cost - poetry, public festivals, and so on. And many still don't (e.g. free punk/underground/indie/etc public performances), Soundcloud music, and so on.
Most movies and series seen on TV are also ~0 (and for kids, everything is ~0, as their parents foot the bill), but they're still touched by them.
>The only real question is how will human artists (provided they exist in your preferred dystopia) will prove that they have created something themselves.
Note the loaded words "your preffered dystopia" (who says whether I prefer it or not? I merely describe what's the case. You have some ethical/political point to make).
As for the answer to the question, they wont have to. People respond to the quality of the work, not who made it (and whether they used AI or chance - another popular method - or not).
In fact tons of genius artists have described themselves not as the creators but as "mere conduits", and say the music/words/etc come from "elsewhere" (implying god, some muse, some spirit, etc). Especially when they fell the most "inspired" (the word itself means "visited by the spirit").
None of those things had zero price and zero cost. The fact that the consumer didn't pay directly for them is irrelevant.
You can try testing your theory by trying to sell a "painting" created by DALLE/whatever for more than a third-rate amateur painter can sell one of his. Good luck with that, especially when access to the model becomes easy.
>People respond to the quality of the work, not who made it
This is so painfully incorrect and naive (and contra anything we know about the value of everything which creation has been automated before) that I think it's meaningless to continue this conversation.
>You can try testing your theory by trying to sell a "painting" created by DALLE/whatever for more than a third-rate amateur painter can sell one of his. Good luck with that, especially when access to the model becomes easy.
As if that proves anything? Sale price is irrelevant. There are paintings sold for millions that 99.9% of the people could not give less fucks for, and "amateur painter" stuff that touch most people who see them.
It's also not like a $2 million in production costs Michael Jackson song with $50M sales is "better" artistically (as opposed to commercially) than a song composed and played by some random guy on an acoustic for ~0.
>This is so painfully incorrect and naive (and contra anything we know about the value of everything which creation has been automated before) that I think it's meaningless to continue this conversation.
It was meaningless to begin with, as you don't discuss, you present your "ultimate truth" ("contra anything we know", lol).
In fact there are tons of works where the creator is anonymous (from folk music and art to early house, techno and rave music, a scene with cherished anonymity), and people respond to it just fine...
Not sure why I'm being downvoted here - I agree that this idea has been the same for most of history.
Your example of folk music is an odd one, for exactly that reason - it largely repurposes existing art. For example, Wagner wrote extensively about why we shouldn't respect folk music for this reason. I mostly disagree with him, but his comparison at least illuminates that this isn't so black and white. And that's really just scratching the surface of a complex topic.
I sense that if someone came along 2400 years ago with the exact play that Sophocles had just produced and claimed they had just composed it themselves, immediately after a public performance, someone would claim that theft had occurred. Do you disagree?
>I sense that if someone came along 2400 years ago with the exact play that Sophocles had just produced and claimed they had just composed it themselves, immediately after a public performance, someone would claim that theft had occurred. Do you disagree?
Yes. They would say it was "plagiarism", which is different than theft.
> The idea of "theft" in that regard came in the last 2 or so centuries, and was enforced with artificial legal barriers and new "ethical" concepts that are neither "natural", not present for the vast majority of history
This is true for other forms of property as well, like land ownership.
This type of argument always distracts from the fact that figuring out where we draw the line between theft and reimagining.
The Magnificent Seven for instance was a reworking of Seven Samurai, but stands on its own as an original creation. Going into a cinema and filming a picture to later put on a torrent site is not artistic reworking.
The hard discussion is about what is acceptable, we all know prior art exists.
There are many differences between those acts of thievery or inspired creation however you might call it. But there are many similarities too. Fascination with the original is one. Desire to own it in one way or another is one too. Differences are in the skills, the means, the result, what was stolen and financial success that came out of the act.
What if we just say "both"? Libraries were a thing for millenia and writers still wrote books. There are costs to IP laws and the benefits aren't obvious.
the grandparent comment said the benefits of IP Laws were not obvious. So it is of the benefit of the laws as they currently exist, that implies enforcement of said laws.
Because writing a book, shooting a movie, composing a song, takes time ?
So either those pieces are IP-protected, and their author can make money with it, or we have to set up a basic income for everyone, and art becomes free.
It's perfectly consistent to say both that there needs to be a system to ensure creators are compensated and that the current system for doing so is terrible.
It is consistent but useless if you have no suggestion as to what would replace the current system in a way that preserves the benefits to both parties.
1. Creators get a sustainable reward for their work. They wouldn't do it otherwise. I certainly don't do it for fun.
2. Consumers get to access that work as they wish.
(Of course, this being HN, I'd expect any ideas to apply to developers as well as to writers and artists i.e. if writers have to give up copyright, so do developers, startups, and so on.)
Keeping the benefits intact for both parties is a non-goal.
How about 14 year max copyright terms? Make copyright unsellable and uninheritable, so you don't get massive copyright hoarding entities that can distort legislation for their own benefit?
That's just two suggestions off the top of my head. I do get tired by false dichotomies.
It was a news to me so I checked and it's true. Since 2016 in my country ;)
And it's a symbolic amount for vast majority of authors (country-wide it's around 5-5000 USD per year per author and the distribution is heavily skewed towards 5 USD).
So yeah :) I think authors were fine without these 5 bucks a year.
EDIT cause it might not be obvious. It's not per library. It's per country.
Not in the USA, where the "first-sale doctrine" means once you buy a book, you can do whatever you want with that copy of the book (lend, rent, sell, destroy) without needing a license. Libraries in the USA definitely don't pay a fee beyond the purchase price of the book (or they can legally lend donated books etc). Copyright holders don't make any additional money from library lending.
I am not familiar with how it works in other countries, but I have heard something about there being such a fee.
(It's not quite true to say libraries have existed for "millenia" though, with regard to this issue. Mass produced printing hasn't in fact existed for millenia, libraries 1000 years ago had hand-copied manuscripts, probably mostly scrolls. The effect on "the market"? For whatever reason authors were writing then it was not to make money by selling reproductions of their writings, that wasn't a thing. Which means, yeah, btw, people still wrote things and made up stories even when they couldn't make money by charging people for copies to read...)
> This type of argument always distracts from the fact that figuring out where we draw the line between theft and reimagining.
This seems to be missing a word, could you clarify?
Also: since you mentioned theft: this actually comes down to the discussion whether you can own thought and/or digital artifacts which can be replicated without taking anything away from the "owner".
Given the absolute choice I'd rather pick complete freedom than restriction. I suspect that anyone's opinion on this follows what they value higher: creation or exploitation.
Sorry, I should have double checked, that sentence was incomplete. Yes, I meant to say that a more nuanced approach is crucial, and that means rejecting that we have to choose between Disney-backed extreme IP laws or total freedom.
Unless every invention is gonna be AI generated (which is kind of a scary situation), intellectual property still needs to be a thing (otherwise people won't have incentive to invent, it'll just be stolen from them).
People have an innate desire to invent and create. This is why so many people do it for zero extrinsic reward. Hell, this is the case for almost every musician. They are fed a pittance in streaming, only a bit more than most OSS developers get.
This intrinsic motivation is more normally "farmed" by investors who capitalize and capture the IP value for themselves. This actually has a detrimental effect on innovation.
Doing away with or watering down intellectual property protections will just take big meaty chunks out of the stock market and partly equalize wealth distribution.
It'll probably spur innovation too - historically it usually has, but preserving the existing social order takes precedence over that which is why a lot is invested in persisting the myth that it aids rather than hinders innovation.
> otherwise people won't have incentive to invent, it'll just be stolen from them
Citation needed. Speaking personally, I spend most of my creative energy on a project which is open source and permissively licensed to the point where I’m fine with anyone stealing it. I expect to earn negative money from it at the limit.
Why do I do it? I dunno it’s fun. Can’t that be enough?
I'm not sure what do you mean by "theft-less" but I believe you might be conflating inspiration with derivative work: Copilot can produce verbatim copies of open-source code, this would make it more similar to how some musicians sample other people's music to create new music.
> Pretty soon the world is going to come to realize art/creation is just blending, incrementing and repurposing prior art
If that happens, the big copyright/IP conglomerates will immediately jump on that and make sure that laws are adjusted and they get their cut of every single word and line anyone puts near their smartphones ;)
>Pretty soon the world is going to come to realize art/creation is just blending, incrementing and repurposing prior art.
That applies to everything, its even a basic law of physics, and there's absolutely nothing wrong with it. Any layperson already knows what a remix is anyway so not sure what you think will change
Technically, programmers search, copy and modify code all the time.
One might argue copilot puts into software an algorithm that humans are already doing. Software like that is usually inevitable.
Still, it sucks there's no benefit for the contributors.
The most ethical thing I can think of is some kinda 'Spotify-like' revenue sharing model, based on how often their code is used by others. Not that they'd ever implement that if they can get away with it!
> The most ethical thing I can think of is some kinda 'Spotify-like' revenue sharing model, based on how often their code is used by others. Not that they'd ever implement that if they can get away with it!
Based on my understanding of how NNs work, I'm not sure its even possible to implement something like that.
> One might argue copilot puts into software an algorithm that humans are already doing.
That argument only works if you think what Copilot is doing is meaningfully similar to what humans are doing. The debate about how these models relate to human thought might have legal implications.
As I understand it (IANAL) copyright doesn't protect ideas and concepts. It protects the content itself. In theory, if I read some copyrighted work, understand some idea in it and then create a new work using that idea, without copying that original work, then that is not a derivative work. (I think this is at least how it's supposed to work - would love to be corrected if that's wrong.)
So if I took a copyright work and rot-13ed it before distributing copies, I think that would be clear copyright violation, but if I made my own works using concepts I gleaned from reading it, it wouldn't be.
So should Copilot be treated like the rot13 algorithm or like me understanding concepts and generating new works using them? That sounds like a fascinating legal debate to be had.
I don't consider copying a 3 liner from stack overflow and not writing an attribution plagiarizing (regardless if technically speaking it is or isn't according to the law).
> Plagiarism isn’t a legal concept, it’s an ethical one.
Well if it isn't a legal but an ethical concept, then that's just your opinion, since there isn't some universal body that establishes exactly what is ethical and what isn't. And as I said in my previous comment, "I don't consider".
> You need to either attribute the source, or rewrite it in entirely your own words — just like when writing a paper.
Often times a three liner can not be changed in any way, and is the only solution to a problem. In some cases you may be able to change it only in terms of indentation and variable names (in others you can't even change that).
But assuming you can do that, it makes no sense at all just changing indentation and variable names just for the sake of changing it.
> Confirming to the license is also required; iirc, SO requires attribution under the CC-SA license.
You should use the example to understand the underlying problem, at which point you will be well-equipped to write your own one-liner.
If you can’t write it using your own understanding of the problem, you’re not an adequate programmer and need to improve your skill-set … which won’t happen if you just keep plagiarizing code you don’t understand.
You're basically just repeating that your opinion is the right opinion.
I don't agree that such example is plagiarism and I'm sure a lot of people also would disagree that that's plagiarism.
> You should use the example to understand the underlying problem, at which point you will be well-equipped to write your own one-liner.
> If you can’t write it using your own understanding of the problem, you’re not an adequate programmer and need to improve your skill-set … which won’t happen if you just keep plagiarizing code you don’t understand.
Who says you can't write it by your own, or you don't understand it? Stack overflow and tools such as copilot are often about saving time, not that you would be unable to figure it out by yourself.
And besides that, the point of those examples is that a lot of people without searching for those stack overflow posts, would type that exact same code character by character.
Copilot is a new way for corporations to break copyright while enforcing it for everyone else, this will be the first big use for AI when other corpos follow.
On a side note, I do believe that short programs or functions should be copyright free by law.
Or we as a community need to create a better bsd, a cc0 for everything.
Almost everything is nontrivial, and almost everything is copyrighted, at least with the pressure to name the original author (BSD, GPL, other major permissive licenses).
Say you want to use a library, then you check for examples in the documentation, now you have to denote somewhere that the example is from the documentation (best if you put it in the source code, so you don't lure other people to copy what you copied and refer you as the author).
What about a law that makes all code available but then requires you to use a portion of your earnings to compensate the people their dependencies you used?
840 comments
[ 2.8 ms ] story [ 68.7 ms ] threadBut as far as I understand, GitHub trained Copilot on any public repository on GitHub, meaning even if it doesn't have a license specified (so the user publishing it still has the copyright to it), then I don't see how it can be OK.
Now, where the threshold is for substantial derivative work in order to require attribution is an interesting question.
But that would mean Microsoft acknowledging license violations.
Ah. But then someone else is guilty of redistributing code without permission.
But you're suggesting, GitHub should implement something like ContentID but for code. Which should be cheaper (since code is cheap to analyze, while videos are much more bandwidth-intense). And this would kill two birds with one stone.
> I checked if it had code I had written at my previous employer that has a license allowing its use only for free games and requiring attaching the license. yeah it does
It'd be much more interesting if he setup a function that was doing a similar thing but with different parameter types and names, and a different order of parameters (ie, like a real problem).
Hence why I agree with another comment somewhere that Microsoft is banking on software developers not litigating about use of their open source code in closed source projects.
- respect attribution
- respect copyleft
- respect proprietary licences
- give the user appropriate hints about the above
Or does it just copy code without doing any of this?
Is it like that?
The whole thing is just bizarre when the vast majority of developers constantly look at OSS code daily and lift ideas/patterns/snippets from there regularly without once looking at whatever license is attached.
Perhaps in your circles, but that's certainly not something I've encountered over a 25 year carreer.
If you're googling solutions around you're already not taking intellectual property seriously enough to care about what happens after you lift ideas around.
I think them being also patent farm has a role in it.
Approved dependencies had api doc linked so no need to Google these.
A concern, which I think is legit, is that it is quite easy for someone with a strong presence in search, web advertising, analytics and mobile to puzzle together what a company is investing in based on the aggregated research and web access from known locations
Maybe I live in a bubble, but the likes of Google/StackOverflow have been part and parcel of a developers toolbox for many years now.
And in any case I wonder how that is enforced. Eg, Someone goes home in the evening and visits github, learns a new trick and comes into the office the next day and implements it.
Yes, I’m not a plagiarist.
If you’re literally copying and pasting code snippets without attribution, you’re plagiarizing.
You’re also probably violating the OSS project’s license.
It’s no different than copying and pasting someone else’s sentence or paragraph into a written paper.
why so?
> The whole thing is just bizarre when the vast majority of developers constantly look at OSS code daily and lift ideas/patterns/snippets from there regularly without once looking at whatever license is attached.
well, yes, copying an idea or pattern is generally.. accepted, to be kosher. copy-pasting too, in small amounts (a function, a type). that said, i would (and have) attribute even a notional similarity when writing something open source.
i don’t think co-pilot even allows the user to find where the code came from.
[0] https://en.wikipedia.org/wiki/Google_LLC_v._Oracle_America,_...
I honestly don't understand the general outrage at this fair seeming deal to me.
Way too often I burn half an hour needlessly during review in one of two ways:
* trying to figure out how the heck someone figured out some "magic" code that achieves something by invoking a bunch of poorly documented library or framework internals, and trying to reverse engineer WTF all the magic does by diving into the framework's source... only to eventually think to google the whole snippet rather than each individual method call, and discover it's copied from a Stack Overflow answer
* trying to figure out why something was written in an unidiomatic or overcomplicated way rather than a more obvious approach, and commenting at length on how I'd simplify it... only to eventually realise it was copied from a Stack Overflow answer
Attribution isn't just about making sure the right person gets credit, or about license compliance; reviewers and maintainers frequently need to be able to see where stuff was copied and pasted from in order to do their jobs effectively, even for snippets of just a few lines.
If the solution was copied from an OSS project without proper attribution? Yes. Absolutely. And they'd have words with a senior dev and maybe even legal if the code they copied made its way into production without attribution.
Many copyleft OSS licenses require attribution and distribution of derivative works that we wouldn't allow.
I’d also expect for any stack overflow code to include a comment with a link to the stack overflow page.
I think one of the key points is to make sure any code taken from another source is cited appropriately. If it isn’t, or the junior dev is passing it off as their own work, then we have problems.
This isn't derived from principled reasoning, but I think of it as similar to community norms. Not the best example, but you wouldn't mind someone subletting their homes to Airbnb, but if all of your apartment complex does it, it invites regulation. A product like copilot enables copying code (even if inspired, and not verbatim) at a scale that individual developers can't. So respecting software licenses needs to be codified (legally?) while previously it was left unmonitored.
We can take as self-evident that a human is capable of reading about something, conceptualising it, and then writing something completely new with the knowledge they have gained.
I think it's also pretty uncontroversial that the primitive "AI" we currently have is nowhere near the level of even an average human at these things, and thus we can't just blindly assume it is conceptualising rather than copying. Copilot regularly produces verbatim copies of existing code when working on non-trivial things.
Forget about the "AI" label: Copilot is just a complex computer program, that takes code from other people and inserts various permutations of it into your editor, whilst ignoring the license of that code.
My position is that if a person hired in a company can currently use Google, Stack Overflow and GitHub to help develop their custom scripts, and no moral or copyright issues are infringed (ie, you don't try to say you came up with it on your own, and you use only enough that it is clearly fair use), then I think an AI should be able to assist in that task. There is no need to complicate things by legislating what the AI is doing and what Google is doing, as they are very similar things and in fact even use similar methods.
At the end, when in several (2-5) years we start seeing structural unemployment emerging because of AI deployments, this will be resolved by the legal system, most likely by some sort of partial prohibition of training/monetizing such systems.
Many people are worried about this, which is why there is a lot of debate about minimum income programs. However, at present, what Copilot is doing is similar to what Google does, and it is certainly not going to replace devs any time soon. Personally, I think we should exploit technology to its fullest, and the only reason we can have this conversation is because in the past, we haven't given too much consideration about the mailmen, secretaries, delivery workers and everyone else who got displaced by our use of the internet and similar technologies. We merely adapted to better exploit them.
It's taking inputs, ignoring their licenses, permuting them in ways that are not understandable to the user, and then outputting them.
That's an entirely different task than the user reading SO or using Google and then writing their own code, because the "AI" is not capable of writing its own code at that level.
Relying on this tool means ignoring the license of code that you're copying, without even knowing that you're doing it.
I would say it's a very similar task. If I need to remember how to use a certain function, I can Google for documentation and examples, or I can tell Copilot what I want to do. The fact that the solution was presented by Copilot or a SO thread is, in my view, irrelevant. And to compound on that, I doubt anyone checking SO truly knows where that answer came from. The person could simply be reproducing a snippet from somebody else, you have no way of knowing if it was licensed.
I don't think this is bad either. Even our current shitty copyright laws protect that kind of use. I shouldn't have to worry whether my little prime number generator uses an algorithm first created by John Carmack or Microsoft. Programming has evolved rapidly in great part because we can all use other people's work and use it to improve ours. Of course you shouldn't just copy and paste everything and call it a day, but that's hardly what Copilot enables anyway.
Also, please consider that there is a toggle that allows you to block Copilot from using public code.
All SO questions, answers and comments are CC BY-SA. The terms of the site say that anyone submitting this content agrees that it's licensed that way, and when you visit the site you agree that you are provided with the content under that license. It's not necessary for you to check whether the submitter had the right to offer it under that license; that's their problem. The same goes for any content offered to you under a given license on any platform. I don't understand what your question has to do with the conversation.
The problem with Copilot, and I really can't believe this has to be restated over and over again, is that it takes code from projects with various licenses, and outputs it in your editor in various transformed-or-not-transformed ways (the fact that the transformation is extremely complex doesn't change anything), and gives you no way to know where the code came from, how it was licensed or how it has been transformed. So, despite the fact that if you use it enough you are virtually guaranteed to use code in contravention of its license, you cannot even know which projects you have stolen code from or which licenses' terms you are breaking.
> Also, please consider that there is a toggle that allows you to block Copilot from using public code.
Great. I'm sure its utility doesn't go down at all if you turn that toggle off...
Have you ever read GitHub's conditions to know whether they also have the right to use your code that way, no matter how you decide to license it? I feel that you are overly focused on the legal part here, which I'm sure was handled by Microsoft's lawyers. I'm more interested in the question of principle.
No matter what the terms of use at SO say, anyone can give you an answer that is a copy of some code they don't own. You may consider that immoral, but I don't, not at the scope SO is used for. In addition, the vast majority of cases at SO and Copilot are not about complex functions being stolen, it's about some dumb code you would have found in 2 minutes of googling. What I'm trying to argue here is that if we are all cool with SO and think it's useful, there is no fundamental difference here. We never cared too much about licenses for boilerplate code, and I think we shouldn't start now.
I have, and there is not. Neither could there be — in many cases the person uploading code to GitHub is not the copyright holder — they are just doing something permitted under the license — and for a large open source project there could be thousands of copyright holders. A random person mirroring some source code to GitHub is in no position to negotiate different license terms on behalf of the copyright holder(s).
> No matter what the terms of use at SO say, anyone can give you an answer that is a copy of some code they don't own. You may consider that immoral, but I don't, not at the scope SO is used for. In addition, the vast majority of cases at SO and Copilot are not about complex functions being stolen, it's about some dumb code you would have found in 2 minutes of googling. What I'm trying to argue here is that if we are all cool with SO and think it's useful, there is no fundamental difference here. We never cared too much about licenses for boilerplate code, and I think we shouldn't start now.
I don't understand why you think a person writing an answer on SO and a computer program outputting some permutation of its inputs into your editor are the same thing. The person writing an SO answer is intelligent and capable of conceptual understanding, the computer regurgitating code without regard to its license is not.
At least one IP lawyer strongly disagrees, suggesting anything you host on GitHub is fair game [1].
[1] https://fossa.com/blog/analyzing-legal-implications-github-c...
> The person writing an SO answer is intelligent and capable of conceptual understanding, the computer regurgitating code without regard to its license is not.
From a copyright perspective, that is irrelevant. In fact I would think Copilot has more incentives to not infringe than a random SO user, who is very unlikely to be sued. I already argued in another post that in my view, from any perspective, it is also irrelevant whether it's a person or AI doing the same work Copilot does.
The question is whether Copilot's users can use the regurgitated code without following the license terms, not whether Copilot was allowed to train their model on it. I agree it's likely fine for them to train the model, but the use of Copilot would seem to be a legal minefield.
A little thought makes it clear that an affirmative answer would be absurd. This would mean that using a simple tool (let's say `cat`) to make a copy of some code and subsequently ignoring its license terms is infringement, but if the software used to make the copy is more complex (or perhaps if it has the "AI" label stuck to it!) the same actions are not infringement.
>My position is that if a person hired in a company can currently use Google, Stack Overflow and GitHub to help develop their custom scripts, and no moral or copyright issues are infringed (ie, you don't try to say you came up with it on your own, and you use only enough that it is clearly fair use),
Only a judge will determine if it is actually free use, if you by change copied some super clever and unique code into your code base then I am sure a judge will not say it is fair use, copilot was proven it will do this(though MS said they put some IF-ELSE checks in the AI to prevent the plagiarism to be detected by removing obvious results and maybe obfuscating stuff more).
Maybe Stack Overflow license allows you to copy paste the answers in your code, but GitHub code has repo specific license that you need to respect.
If MS trained the model on all their private repos too and made the model free software then many would not have this issues. Or keep the model proprietary and train it only on the MS repors, BSD and similar licensed repos.
Copilot is much more sophisticated than that, and it no more copies code than a human does. It generates on a character by character basis given the contextual probability of the next character conditioned on the previous set of tokens with the "heat" being a factor how how randomly it will choose characters.
This is much more similar to how a human writes than "copying".
All the "copied code" I've seen is where the person prompts it with a large amount of very unique preamble and then it fills in the exact example they are quoting from.
Try it without doing that.
And it's weird people think it can't understand conceptual relationships. Word2Vec demonstrated that nearly 10 years ago and that's a much weaker model in terms of both size and techniques than this is.
Saying that Word2Vec or Copilot have "understanding" of their input requires a redefinition of the word "understanding".
Basically, the project was to package Cordova + Backbone + Marionette, plus a couple of tools, under their own commercial name. Then they'd go around potential clients presenting it as the perfect solution to build hybrid applications for web/mobile/smartTV/whatever.
A certain Monday, the "architect" arrived boasting. He did that often, but this time he was more boastful. He explained that he had spent the whole weekend coding. He had written an incredible tool that would create a skeleton for a project from zero. You would type something like `tool create` and it would create the whole project with all the scripts and some example views and whatnot.
It was Yeoman's yo CLI tool, of course. He had just changed the copyright in the comments, removed most of the comments, he had deleted any mention to yeoman or the original creators, changed the name of the executable script and that's it.
The whole thing was OS code picked up from various repos and packaged as their own. The company used it to sell development projects. The so-called-architect used it to sell himself inside the company and then jump away into a startup as CTO.
Is this common or is it just anecdata? I don't know. It's clearly not the only time I've seen something like this and I do know that in certain companies around here it isn't exactly uncommon. But I can't say how common or uncommon it is.
Would I call this "selling other people's code"? Yes, I would.
Does anyone even know? Can we even check? What if 1 in a thousand, or one in a million outputs is (very close to) something existing? I find this especially relevant when generating faces.
If you are using it to write whole complex functions thatare the same as other people's, I guess that is copying.
But if you do the second thing you are not a great dev, and would have probably ended up copy pasting it anyway.
I think the first use case is far more common, and creating boilerplate that is so generic you could never really attribute it anyway.
This whole thing would be fine if GitHub hadn't just used all public code on their platform, ignoring all involved licenses.
If you do that on your own, it's your (legal) responsibility. If Copilot does it for you, it's GitHub's/Microsoft's responsibility.
If I use grammarly, are they responsible for what am I aiming to write?
You can no more claim ignorance of where the github copilot code comes from than where the Amazon's low, low prices come from.
Whether you care is totally on you regardless of whether you pay ir not. You pay for product or service not moral absolution.
At the same time when fast fashion companies sell T-shirts made with slave labour, its not the company's responsebility to check what their suppliers are doing.
And if tesla autopilot kills you and your family its not their fault either.
Neoliberal morality - companies are never accountable for anything, it's heresy to suggest they should do their job properly.
Zara's clothes sometimes have notes in their pockets from people being held as slaves, pleading for help. I havent heard of anyone going to jail
most of our electronic waste end up illegally exported to poor countries, again when was the last tomw someone faced the music for that?
Is this true? It hasn't been tried yet I assume?
GitHub/Microsoft says that it's still your responsibility.
>You should take the same precautions as you would with any code you write that uses material you did not independently originate. These include rigorous testing, IP scanning, and checking for security vulnerabilities. You should make sure your IDE or editor does not automatically compile or run generated code before you review it.
I'm not really sure how am I supposed to go about validating that I can in fact use this code that the magical black box barfed into my IDE using a bunch of different weights.
If Copilot is fair use, and has no restrictive license, than how is it anyone's responsibility?
If Copilot isn't fair use, it's Microsoft's responsibility.
(For copyright; for patent that's another issue, but you can violate patents by similarity without exposure or copying, anyway.)
Give us your money but you are responsible for the code that OUR tool generates.
> But if you do the second thing you are not a great dev, and would have probably ended up copy pasting it anyway.
How would I know that the boiler plate I ask copilot to write for me is copied verbertim from a codebase, that neither I nor Microsoft has licensed to use?
It's like saying GPT-3 created text is copyright infringement, because some author used the same sentence in a book before.
I could ask you the same thing.
You work on your code, Copilot makes a suggestion. You read that suggestion and verify that it’s close to what you were already going to do. If it is, you hit tab, then you tweak it. There’s nothing blind about this process.
There's already a way to quickly solve the boring parts in development - libraries which were built and licensed around that purpose. But Copilot passes you code of unknown origin, with unknown license terms and no information about how close it is to an existing codebase. It's like a person trying to sell you Macbooks for a hundred bucks per unit but you don't know where they came from and who made the holiday photos stored on the harddrive.
No matter how interesting your problem is, translating it into code is going to involve a lot of grunt work. This isn’t just boilerplate, but also the large portion of your code which is going to be gluing things together.
The time you spend working through those menial parts of your code is time when the context of the interesting part of the problem fades. Once you get the mechanical stuff out of the way, you have to load the interesting stuff back into your brain.
This is where AI coding tools really shine. They dramatically reduce the intervals between when you can think about the actual problem you’re solving by letting you get the boring mechanics out of the way more quickly.
This is an implementation of a 1991 paper on polygon triangulation into Go. So the deepest thinking about how to solve the problem was obviously already done for me, but there were a number of edge cases that I had to invent my own solutions to, and the translation itself involved keeping a lot of context in my head.
I can’t tell you in precise detail what Copilot did, and what I wrote by hand. I wasn’t taking notes or recording my screen. But there’s a reason you don’t see a lot of blocks in there where I forgot to comment anything, because my entire process for this was “type what I want to do in English, and see if Copilot will generate the next snippet, or something close”. I didn’t do this out of bloodyminded dedication to the AI cause, but because it continued to be an extremely effective way to get the code written quickly.
I can give a few specifics:
- My linear algebra is rusty, and Copilot was extremely helpful here. I would often just type the basic thing I was trying to do in pretty vague linear algebra terms, and it would generate the formula.
- I wrote a lot of tests like this https://github.com/osuushi/triangulate/blob/main/internal/sp.... This is a minor thing, but those aren’t copy-pasted. Instead, I would write the first test, and for the most part, I could just type something like `func TestConvertToMonotones_SquareWithHole`, and it would figure out how to adapt the previous test automatically.
- It generates exactly the error strings I want based on context an enormous percentage of the time.
I want to stress that I’m just giving a few examples of things that I specifically remember because I talked about them at the time, not characterizing the majority of the experience of using Copilot. The majority of the experience of using Copilot is that you write comments, and then the things you were about to type appear on the screen before you have to type them.
If I find myself writing a 200 line function with nested or repetitive loops I expect to hear from colleagues about how I should refactor it.
I feel that the solution to writing boring, repetitive boilerplate shouldn’t be to automate writing more of it, but to reduce or remove it entirely. Seeing things like this just reinforces my preconception that Copilot acts in low quality code environments to produce fittingly low quality code, or with languages like Java where the language is married to boilerplate.
Someone creates content for free, and companies monetize it.
I don't use github. Can someone explain what the author means?
Edit: in detail
Your question seemed to lack this kind of work and was probably therefore downvoted.
I don't think that's so much about "asshole culture" but more like time management, as not everything can be explained to everybody in every topic.
GitGub Copilot is an advanced autocomplete / code generation system, based on a machine learning model. The code used for training the model is taken from projects hosted on GitHub. These projects were published under different licenses.
The main questions are:
Some of the licenses need something from you if you create a derivative work. Does the Copilot training itself count as creating a derivative work?
Sometimes the autocomplete basically quotes the original code. Does the original license then apply to the autocompleted / generated code too? How much of verbatim code quoting does it need for the result to be considered a derivative work?
No book, painting, codebase, sonnet, design is theft-less.
The art is the space reduction, otherwise we’d just bruteforce away.
And I'm sure I couldn't disagree with you more. Or are 'influence' and 'theft' the same now?
I don't think it will any time soon though.
They have been the same for most of history. People could openly copy titles, plots, parts, phrases, etc from prior work. Same for mechanical designs. The only thing preventing them was obscurity (e.g. the inventor trying to make it hidden) not any law or ethical idea that it's bad (there wasn't any). That's how things from math to gears to tunes got better (or changed over time, in the case of art, as better/worse is subjective there).
E.g. globally and historically folk music has been basically taking whatever you want from tunes and songs where everybody does the same with no "permission" asked or needed to be given.
Like 4 verses but want to add a fifth or change some part? Go ahead. Want to play it exactly like you've heard it? Go ahead again.
The idea of "theft" in that regard came in the last 2 or so centuries, and was enforced with artificial legal barriers and new "ethical" concepts that are neither "natural", not present for the vast majority of history (including golden ages of art production).
You'd be surprised. Especially if people don't care/are told/whether it's "created by AI or not".
Whether in "high art" or lowly pop, "generative music" (and fine art) has long been a thing. And people do attach to it (e.g. to Brian Eno's generative works made by rule based systems he programs).
Art doesn't touch people because it has cost.
In fact, for ages certain types of art had no cost - poetry, public festivals, and so on. And many still don't (e.g. free punk/underground/indie/etc public performances), Soundcloud music, and so on.
Most movies and series seen on TV are also ~0 (and for kids, everything is ~0, as their parents foot the bill), but they're still touched by them.
>The only real question is how will human artists (provided they exist in your preferred dystopia) will prove that they have created something themselves.
Note the loaded words "your preffered dystopia" (who says whether I prefer it or not? I merely describe what's the case. You have some ethical/political point to make).
As for the answer to the question, they wont have to. People respond to the quality of the work, not who made it (and whether they used AI or chance - another popular method - or not).
In fact tons of genius artists have described themselves not as the creators but as "mere conduits", and say the music/words/etc come from "elsewhere" (implying god, some muse, some spirit, etc). Especially when they fell the most "inspired" (the word itself means "visited by the spirit").
>People respond to the quality of the work, not who made it
This is so painfully incorrect and naive (and contra anything we know about the value of everything which creation has been automated before) that I think it's meaningless to continue this conversation.
As if that proves anything? Sale price is irrelevant. There are paintings sold for millions that 99.9% of the people could not give less fucks for, and "amateur painter" stuff that touch most people who see them.
It's also not like a $2 million in production costs Michael Jackson song with $50M sales is "better" artistically (as opposed to commercially) than a song composed and played by some random guy on an acoustic for ~0.
>This is so painfully incorrect and naive (and contra anything we know about the value of everything which creation has been automated before) that I think it's meaningless to continue this conversation.
It was meaningless to begin with, as you don't discuss, you present your "ultimate truth" ("contra anything we know", lol).
In fact there are tons of works where the creator is anonymous (from folk music and art to early house, techno and rave music, a scene with cherished anonymity), and people respond to it just fine...
Your example of folk music is an odd one, for exactly that reason - it largely repurposes existing art. For example, Wagner wrote extensively about why we shouldn't respect folk music for this reason. I mostly disagree with him, but his comparison at least illuminates that this isn't so black and white. And that's really just scratching the surface of a complex topic.
I sense that if someone came along 2400 years ago with the exact play that Sophocles had just produced and claimed they had just composed it themselves, immediately after a public performance, someone would claim that theft had occurred. Do you disagree?
Yes. They would say it was "plagiarism", which is different than theft.
And there was no law against either case.
This is true for other forms of property as well, like land ownership.
The Magnificent Seven for instance was a reworking of Seven Samurai, but stands on its own as an original creation. Going into a cinema and filming a picture to later put on a torrent site is not artistic reworking.
The hard discussion is about what is acceptable, we all know prior art exists.
What if we just say "both"? Libraries were a thing for millenia and writers still wrote books. There are costs to IP laws and the benefits aren't obvious.
As a consumer, it's quite obvious to me too how it benefits only the writer/creator at the detriment of everyone else.
So either those pieces are IP-protected, and their author can make money with it, or we have to set up a basic income for everyone, and art becomes free.
1. Creators get a sustainable reward for their work. They wouldn't do it otherwise. I certainly don't do it for fun.
2. Consumers get to access that work as they wish.
(Of course, this being HN, I'd expect any ideas to apply to developers as well as to writers and artists i.e. if writers have to give up copyright, so do developers, startups, and so on.)
How about 14 year max copyright terms? Make copyright unsellable and uninheritable, so you don't get massive copyright hoarding entities that can distort legislation for their own benefit?
That's just two suggestions off the top of my head. I do get tired by false dichotomies.
And it's a symbolic amount for vast majority of authors (country-wide it's around 5-5000 USD per year per author and the distribution is heavily skewed towards 5 USD).
So yeah :) I think authors were fine without these 5 bucks a year.
EDIT cause it might not be obvious. It's not per library. It's per country.
I am not familiar with how it works in other countries, but I have heard something about there being such a fee.
(It's not quite true to say libraries have existed for "millenia" though, with regard to this issue. Mass produced printing hasn't in fact existed for millenia, libraries 1000 years ago had hand-copied manuscripts, probably mostly scrolls. The effect on "the market"? For whatever reason authors were writing then it was not to make money by selling reproductions of their writings, that wasn't a thing. Which means, yeah, btw, people still wrote things and made up stories even when they couldn't make money by charging people for copies to read...)
This seems to be missing a word, could you clarify?
Also: since you mentioned theft: this actually comes down to the discussion whether you can own thought and/or digital artifacts which can be replicated without taking anything away from the "owner".
Given the absolute choice I'd rather pick complete freedom than restriction. I suspect that anyone's opinion on this follows what they value higher: creation or exploitation.
This intrinsic motivation is more normally "farmed" by investors who capitalize and capture the IP value for themselves. This actually has a detrimental effect on innovation.
Doing away with or watering down intellectual property protections will just take big meaty chunks out of the stock market and partly equalize wealth distribution.
It'll probably spur innovation too - historically it usually has, but preserving the existing social order takes precedence over that which is why a lot is invested in persisting the myth that it aids rather than hinders innovation.
Citation needed. Speaking personally, I spend most of my creative energy on a project which is open source and permissively licensed to the point where I’m fine with anyone stealing it. I expect to earn negative money from it at the limit.
Why do I do it? I dunno it’s fun. Can’t that be enough?
If that happens, the big copyright/IP conglomerates will immediately jump on that and make sure that laws are adjusted and they get their cut of every single word and line anyone puts near their smartphones ;)
Would you describe a parody, or a critique/review, as equally without original merit?
That applies to everything, its even a basic law of physics, and there's absolutely nothing wrong with it. Any layperson already knows what a remix is anyway so not sure what you think will change
One might argue copilot puts into software an algorithm that humans are already doing. Software like that is usually inevitable.
Still, it sucks there's no benefit for the contributors.
The most ethical thing I can think of is some kinda 'Spotify-like' revenue sharing model, based on how often their code is used by others. Not that they'd ever implement that if they can get away with it!
Based on my understanding of how NNs work, I'm not sure its even possible to implement something like that.
That argument only works if you think what Copilot is doing is meaningfully similar to what humans are doing. The debate about how these models relate to human thought might have legal implications.
As I understand it (IANAL) copyright doesn't protect ideas and concepts. It protects the content itself. In theory, if I read some copyrighted work, understand some idea in it and then create a new work using that idea, without copying that original work, then that is not a derivative work. (I think this is at least how it's supposed to work - would love to be corrected if that's wrong.)
So if I took a copyright work and rot-13ed it before distributing copies, I think that would be clear copyright violation, but if I made my own works using concepts I gleaned from reading it, it wouldn't be.
So should Copilot be treated like the rot13 algorithm or like me understanding concepts and generating new works using them? That sounds like a fascinating legal debate to be had.
When following the license terms, preserving the original copyright, etc, sure.
However, honest, ethical people (including programmers) do not plagiarize.
Copying and pasting code without attribution is plagiarism. Doing it without following the licensing terms is a copyright violation.
You need to either attribute the source, or rewrite it in entirely your own words — just like when writing a paper.
Confirming to the license is also required; iirc, SO requires attribution under the CC-SA license.
Well if it isn't a legal but an ethical concept, then that's just your opinion, since there isn't some universal body that establishes exactly what is ethical and what isn't. And as I said in my previous comment, "I don't consider".
> You need to either attribute the source, or rewrite it in entirely your own words — just like when writing a paper.
Often times a three liner can not be changed in any way, and is the only solution to a problem. In some cases you may be able to change it only in terms of indentation and variable names (in others you can't even change that).
But assuming you can do that, it makes no sense at all just changing indentation and variable names just for the sake of changing it.
> Confirming to the license is also required; iirc, SO requires attribution under the CC-SA license.
As I said I'm not talking about the legalities.
https://stackoverflow.com/questions/55319570/how-can-i-raise...
Are you going to attribute that every time you use Math.pow?
Plagiarism being unethical is just my opinion?
> Are you going to attribute that every time you use Math.pow?
Does a simple 2-ary function call of a well-defined API qualify as “taking someone else's work or ideas and passing them off as one's own.”?
If not, then it’s not plagiarism.
What constitutes as plagiarism and what doesn't, outside of what the law says, yes.
> Does a simple 2-ary function call of a well-defined API qualify as “taking someone else's work or ideas and passing them off as one's own.”?
So you agree that taking some code verbatim from SO is not plagiarism then?
What about this, would copy pasting this verbatim be plagiarism?
https://stackoverflow.com/a/959004
And this?
https://stackoverflow.com/a/45049763
It’s pretty clear what it is.
The definition of plagiarism hasn’t changed since you were in grade school and were taught not to copy sentences into your papers.
If you still don’t understand what plagiarism is now, yours is a willful ignorance that doesn’t excuse unethical behavior.
> What about this, would copy pasting this verbatim be plagiarism
> https://stackoverflow.com/a/959004
Yes, that’d be plagiarism. It’s also bad code.
You should use the example to understand the underlying problem, at which point you will be well-equipped to write your own one-liner.
If you can’t write it using your own understanding of the problem, you’re not an adequate programmer and need to improve your skill-set … which won’t happen if you just keep plagiarizing code you don’t understand.
I don't agree that such example is plagiarism and I'm sure a lot of people also would disagree that that's plagiarism.
> You should use the example to understand the underlying problem, at which point you will be well-equipped to write your own one-liner.
> If you can’t write it using your own understanding of the problem, you’re not an adequate programmer and need to improve your skill-set … which won’t happen if you just keep plagiarizing code you don’t understand.
Who says you can't write it by your own, or you don't understand it? Stack overflow and tools such as copilot are often about saving time, not that you would be unable to figure it out by yourself.
And besides that, the point of those examples is that a lot of people without searching for those stack overflow posts, would type that exact same code character by character.
Or we as a community need to create a better bsd, a cc0 for everything.
Almost everything is nontrivial, and almost everything is copyrighted, at least with the pressure to name the original author (BSD, GPL, other major permissive licenses).
Say you want to use a library, then you check for examples in the documentation, now you have to denote somewhere that the example is from the documentation (best if you put it in the source code, so you don't lure other people to copy what you copied and refer you as the author).
It is a major PITA at least for me.
Absolute nonsense.