Live data from Hacker News

StackOverflow Importer – Import code from Stack Overflow as Python modules

github.com

81–87 of 87 posts

Re: StackOverflow Importer – Import code from Stack Overflow as Python modules

#81
post #39

This might be a joke but everybody does it manually for real. Whenever I copy-paste some tricky function from SO I like to add a code comment with the url pointing to the stackoverflow.com answer. This allows future maintainers to refer back to SO and see if a better answer has surfaced or read comments about any issues.

> 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.

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.

Re: StackOverflow Importer – Import code from Stack Overflow as Python modules

#82

Earlier quoted context omitted.

> 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.

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.

Re: StackOverflow Importer – Import code from Stack Overflow as Python modules

#84

Earlier quoted context omitted.

> 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.

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.

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.

Re: StackOverflow Importer – Import code from Stack Overflow as Python modules

#85
post #38

Based on some of the comments here, a sarcasm disclaimer might be necessary on the repo!

(OT) HEY! I finally noticed your Desert Combat comment and responded to it. If only HN had a better commenting/messaging system...

Re: StackOverflow Importer – Import code from Stack Overflow as Python modules

#86
post #84

Earlier quoted context omitted.

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.

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…

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~

Re: StackOverflow Importer – Import code from Stack Overflow as Python modules

#87

It's interesting to imagine adding something like this to an editors auto complete or as some kind of search function to automate functions you've coded a million times. I.e. maybe you type: "repeat a function over a list python" in a special format and your editor pastes in the accepted answer from stackoverflow for you to choose whether that's acceptable / whether you want to use it as a template. Then maybe you co…

Visual Studio has an extension by Microsoft called Bing Code Search which does exatcly what you want. It's really good.
Post reply on HN