Hacker News new | ask | show | jobs
by clifanatic 3511 days ago
> everybody does it manually for real

I've been programming professionally for much longer than there's been a stack overflow. I have never, ever, cut and pasted code from stack overflow.

1 comments

I've worked with people who did it with pride. When I pointed out we had no license for the code, they proudly told me anything without an explicit license was public domain.

I quit not longer after that.

StackOverflow code is under a license - cc by-sa 3.0. They were planning on clarifying this by moving to the MIT license, but there was some pushback on that and they are holding off for now at least: https://meta.stackexchange.com/questions/272956/a-new-code-l...

Besides that, most snippets are small and trivial enough that using them would easily fall under fair use.

Obviously, your case showed a lack of care on their part, but you can use SO code.

How do you know how to loop over an array for (int i=0;... ? You didn't invent that code. You read it somewhere many years ago and have copied it over and over many times since then. Do you have a license for that code? The author you learned it from did not invent it either, was he violating a license? It wasn't even invented by Dennis Ritchie since he copied the idea from earlier languages.

My point is that trying to copyright basic snippets of code is just ridiculous, it's something lawyers have tried to force on programmers but it makes no sense. We would be completely unable to program at all if we listened to lawyers all the time.

Well, actually I just typed [] in my browser's console, expanded it, then expanded the prototype and found a method called "forEach" which sounded like what I wanted. Fiddled with it a bit until it worked.

Clean room usage~