Live data from Hacker News

How often do people copy and paste from Stack Overflow?

stackoverflow.blog

211–220 of 243 posts

Re: How often do people copy and paste from Stack Overflow?

#211

IMO its not even that we're copying people's logic, its just that stack overflow acts as a weird sort of crowd-sourced centralized documentation for programming languages. For example if I forget the name of a function for something in a particular language I don't even go to the docs, I just google something like "python reverse list" and click the first SO link.

I just google something like "python reverse list" and click the first SO link.

If that's your workflow it might be worthwhile adding a custom search to your browser so you can just do "SO python reverse list" and only get results from SO.

Chrome https://www.google.com/amp/s/www.techrepublic.com/google-amp...

Firefox https://support.mozilla.org/en-US/kb/assign-shortcuts-search...

Re: How often do people copy and paste from Stack Overflow?

#214

I was working at a company that was acquired a few years ago, and part of the deal was them doing a source-level audit of code, mainly looking at licenses and open-source. They used some software which could detect copy-pasted source code, and had Stack Overflow indexed. The Stack Overflow stuff was a massive, massive pain, for several reasons. For one, it's not clear how CC-BY-SA applies to code[1]. This involved ma…

This. The CC-BY-SA default license on Stack Overflow makes whatever is posted there unsuitable to be copy-pasted in a proprietary-licensed software. It takes a lot of effort to train people not to do that.

Re: How often do people copy and paste from Stack Overflow?

#215
Way too often. One of the bugs I had the opportunity to debug was caused by a frontend developer who copy pasted invalid JSON from SO and pushed it all the way to production. He used different quotes: “ ".

When the data did not show up on the dashboard he just put the blame on the data team.

Re: How often do people copy and paste from Stack Overflow?

#216
post #204
post #173

Earlier quoted context omitted.

I feel like the experience should make you extremely cautious of using stupid tools to analyze your codebase, not the introduction of external code.

It gives the impression that they don't trust their other more standard testing and analysis tools, and also that they don't trust their developers to use discretion when selecting online resources. And it seems the software itself reflects a misunderstanding about how programming code is actually manifested. It's very possible to read the official docs or use an IDE and end up writing the same lines of code in some…

Checking the origin of the code is a standard step in any acquisition process (I have been involved in several). It's reasonable that people do not want to pay for some code that they later discover has to be released as source. The general attitude is "trust, but verify".

As you say, there might be a case where two independent implementations came up with the exact same code, although the probability of this is reduced exponentially with the size of the exact match. Keep in mind, we do not talk about "i = 0;" here, but something longer. And we do not discuss examples matching the official documentation, because then you can point to it as origin, instead of SO -- and it would probably be under a better license.

The questions are: even if you wrote it yourself, do you justify the costs of potentially going to court to defend the case and are you sure you will convince a judge, who will be the person making the decision?

Re: How often do people copy and paste from Stack Overflow?

#217

Interestingly, I don't remember when the last time I did so was. I seem to be relying on SO less and less. I do sometimes use it as a quick reference, usually because its one of the first results on search engines, but its typically just a quick "ah, that's the function for that" or "ah, that's how you do X" rather than actually copying code. I'm trying to think what's changed, I guess I've just been writing stuff th…

I'm trying to think what's changed Among other possibilities: SO suffers from hostile moderation and a generally unwelcoming culture, perhaps even worse than Wikipedia. This has a profound chilling effect on positive, substantial contributions, particularly from new contributors. SO had a great strategy initially with relying on search engines to index everything, but it never seems to have solved the recency/relevan…

Also the moderation is often hidden. Last week I ran into one of my answers for a language I haven't used in a while. When I read the answer I thought it was odd because the english was very poor. Then I checked and found that a moderator had made a really poor edit of the original answer. Maybe this is reasonable on a site like SO but I really felt that somebody had essentially impersonated me and entirely changed the tone of some writing which was attributed to my name.

Re: How often do people copy and paste from Stack Overflow?

#218
post #126
post #116

I've found that the amount I use stackoverflow is inversely proportional to the quality of the documentation and the strength of the type-system of the language I'm using.

That's me with Python... For some reason I find the documentation extremely cumbersome to navigate and parse. It's just so wordy and dense. And there are barely any examples - which is what I'm usually looking for instead of having to read a whole paragraph. The Elixir documentation on the other hand is succinct and always features basic examples for every function. It's a joy to work with.

+1 for Elixir’s documentation. José Valim knew what he was doing when he made docs so easy and pleasant to create and view.

I always love it when a programming language has their docs available off-line and easily accessible. I grew up on Perl without an internet connection (or a GUI for that matter) so I got very used to the perldoc command. That is now the standard I expect. Elixir is one of the few languages that exceeds this bar imo.

Re: How often do people copy and paste from Stack Overflow?

#219
post #174

Earlier quoted context omitted.

I stopped relying SO and started relying heavily on https://grep.app and Github search. Most of the time the code actually works and there's good references on how to structure things.

If you like grep, you'll probably really like Sourcegraph, which I believe has most of GitHub indexed and supports some useful operators: https://sourcegraph.com/search

It will also download repos for you if you point them at it.

Re: How often do people copy and paste from Stack Overflow?

#220

IMO its not even that we're copying people's logic, its just that stack overflow acts as a weird sort of crowd-sourced centralized documentation for programming languages. For example if I forget the name of a function for something in a particular language I don't even go to the docs, I just google something like "python reverse list" and click the first SO link.

I just google something like "python reverse list" and click the first SO link. If that's your workflow it might be worthwhile adding a custom search to your browser so you can just do "SO python reverse list" and only get results from SO. Chrome https://www.google.com/amp/s/www.techrepublic.com/google-amp... Firefox https://support.mozilla.org/en-US/kb/assign-shortcuts-search...

Or use duckduckgo: it basically has this builtin, so it works the same way without configuration across browsers. Enter !so . No configuration is always nice, plus this really helps when working on other machines than your own.
Post reply on HN