Live data from Hacker News

How often do people copy and paste from Stack Overflow?

stackoverflow.blog

161–170 of 243 posts

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

#162

Earlier quoted context omitted.

Is it just me or is this also a symptom of Python's documentation being really strange to navigate and generally having a massive impedance mismatch with Google? When I search on Google for "python reverse list", not a single link is to the official Python documentation. Not even if I search for "python reverse" does the documentation page show up. Searching for "python reverse documentation" leads to the second link…

Python documentation is a static Sphinx site with no need for JS to render content. That's the easiest possible design for search engines to index. It's Google's fault that their algorithm can be gamed by low quality seo sites.

The only way it wouldn't be able to be gamed is if they kept making large changes to it for no other reason than to be a moving target. Like you can say "oh it's stupid that they prioritize X and not Y when Y is a much better indicator of meaningful content" but as soon as they switch Y to be a priority, sites will shift to maximizing the amount of Y.

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

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

I've been playing with the ast module in Python lately, and the documentation actually says to go look at someone else's documentation because it's better, which is a refreshing take.

Official Documentation: https://docs.python.org/3/library/ast.html

Green Tree Snakes: https://greentreesnakes.readthedocs.io/

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

#164
post #106

Earlier quoted context omitted.

I also really enjoyed Dash when it was free to use: https://kapeli.com/dash

Why not pay for it or get your employer to pay for it, especially if you enjoyed it?

Seriously, it's a $30 one-time purchase. In an age where companies want to charge you $30 per month for software, that's a steal.

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

#165
I copy and paste into my project diary. Which will also have the question that I'm trying to answer (and perhaps exactly what I googled). And of course the URLs of useful things I found. They are often SO. And then I may copy and paste into my diary. Rarely will I paste into source code. Copy and paste errors I find to undo the benefit vs just typing it in and using my own code style.

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

#166
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 many long meetings with copyright lawyers. They ended up asking for all this to be removed, which our C-level people eventuality agreed to.

We had to then go through several hundred "flagged" things (in a hundreds of thousands of lines codebase) and fix or justify everything.

Only a few cases were outright copy+paste of a big function or class, and those were at least straightforward: rewrite. Usually it was old code anyway, and replaced with newer style, much more concise code.

Tons were one- or two-line things, which involved lots of arguments along the lines of "that is the way to open a file in append mode in this language, and logFile is the appropriate variable name in this case!" This is really a failing of the tool they were using, but it still required answering.

The funniest was a handful that were our answers: they were copy+paste our team had done from our code to SO! (Nothing proprietary, just a few lines of an algorithm or solving whatever random problem).

Anyway, this experience left me extremely cautious about introducing any external code (as opposed to libraries) into a codebase. OSS libraries with permissive licenses (MIT, BSD, etc) are easy to deal with: it's straightforward to comply and being a library means the code is nicely compartmentalized if you need to replace/remove it.

[1] https://opensource.stackexchange.com/q/1717

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

#167
post #133
post #119

Earlier quoted context omitted.

Definitely. Looking at my browser history for stackoverflow + PHP, it seems to be things to do with PHP, such as how to prevent a referrer from being sent when users click a link on my website. That's of course not actually part of the PHP language, so it would seem like I'm rarely looking up how to use PHP APIs on stackoverflow. I've always found PHP docs to be the best of any language that I've used.

Though even for PHP StackOverflow is still pretty useful e.g: https://www.google.com/search?q=string+contains+word+php

Note that php.net answer (official docs) is right below the stack overflow one.

I like the php manual. Its pretty simple and has good exmamples. They seem to used to have allowed/ allowed user comments, which used to be really old. (this one seems more up to date)

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

#168
post #162

Earlier quoted context omitted.

Python documentation is a static Sphinx site with no need for JS to render content. That's the easiest possible design for search engines to index. It's Google's fault that their algorithm can be gamed by low quality seo sites.

The only way it wouldn't be able to be gamed is if they kept making large changes to it for no other reason than to be a moving target. Like you can say "oh it's stupid that they prioritize X and not Y when Y is a much better indicator of meaningful content" but as soon as they switch Y to be a priority, sites will shift to maximizing the amount of Y.

With how much money Google spends on ML it's really a wonder that they haven't been able to out-compete a bunch of consultants on SEO. This really seems like a blunder on Google IMO.

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

#169
post #149
post #117

Earlier quoted context omitted.

It’s not just you. Python seems to suffer from Python-specific ”tutorial sites” being SEO’d above Python’s official docs. I don’t know what it is about the Python documentation that lowers its rank on Google search results. In general, not a big fan of Python docs.

JS has / had the same problem, which is why a common tip is to add "MDN" to the keywords to get a higher quality reference style result from MDN: https://developer.mozilla.org/

I wish there was an MDN for Python/Julia.
Post reply on HN