Live data from Hacker News

StackOverflow Importer – Import code from Stack Overflow as Python modules

github.com

71–80 of 87 posts

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

#71
post #61
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.

I never, ever copy paste code, unless it's really long. I always end up rewriting everything myself, so I have the time to think about what's happening.

Hmmmm. I'm the other way round. I copy and paste short snippets because I'm lazy and I can see if they are ok at a glance. Longer code I'll go through line by line and try and 'touch' each line to force me to think about it.

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

#73
post #41

Earlier quoted context omitted.

What if, somehow, there was a guarantee that the code can't harm your machine -- would you use it then? This isn't a joke.

It's not just about harming your machine - it can harm your* data, or data passing through your* system! * Where "your" can mean you, your employer, your customer, another company, etc.

What if it can't harm your data, or data passing through your system?

What if it can't harm anything.

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

#78
post #41

Earlier quoted context omitted.

It's not just about harming your machine - it can harm your* data, or data passing through your* system! * Where "your" can mean you, your employer, your customer, another company, etc.

What if it can't harm your data, or data passing through your system ? What if it can't harm anything.

How could a system that executed arbitrary code ever make such guarantees? I mean sure, if there were a magical thing that only ever produced correct code for what you wanted to do I guess people would use it.

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

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

Post reply on HN