Live data from Hacker News

How often do people copy and paste from Stack Overflow?

stackoverflow.blog

221–230 of 243 posts

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

#221
post #207

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…

Most frequently I do it for PHP. I help a friend with a Wordpress site, PHP is easy to read but I'm hardly fluent in the ins-and-outs, and a simple Wordpress hook added to functions.php can fix so many issues. I always leave a comment with the full link for context.

That's the case of for me as well.

I always leave a comment trying to explain to my future self where I learned to do stuff that was not intuitive.

Bash, Make, non-standard Python libraries, E-Lisp, and Fortran.

Also, it's been quite a while since I've touched JavaScript, so the newer features have been harder to grok.

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

#222

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 have a hunch that this tendency to look up SO rather than actual language/API docs is prevalent more in some ecosystems than in others. For eg, with Rust and Go projects I would invariably read the actual docs (which I find are very accessible to read) as compared to when I write Python or C++ where I'm happy to SO my way through my task. However, what I've found is that reading the actual docs is better for multip…

I would definitely agree that it depends on the strength/weakness of the docs/SO for that ecosystem.

For example. MDN had terrific docs for JavaScript and web apis. Things are discreetly segmented and this easy to navigate. Terrific, up to date information about how to things, why as well as great information on the caveats of the API (what works where and what fails where).

The SO answers are often a hack on how to implement it in an outdated framework. And ten variations that are "faster".

But you might still end up there because you're not sure how to look it up directly in the docs. Maybe you do an SO layover.

.Net is similar, although the official documentation suffers from marketing speak pollution, where it's hard to find answers because Microsoft names their APIs by randomly permutating ASP, Entity, Core and Framework when making things.

Add to that all the trashy noob doc sites, codeproject, csharpcorner... that pollute search.

Both ecosystems suffer on SO because of SOs inability to stay up to date with a changing API. A great example is all the Python 2 answers.

Then you have ecosystems like Scala, which has terrific documentation in source code. As well as official docs that are reasonably easy to navigate. But it's not a huge ecosystem, so sometimes it's hard to find answers to questions that haven't been asked. Then SO provides a valuable platform to get those answers. Sometimes from the maintainers themselves.

All in all, SO often offers a good complement to official docs, ranging from excellent to subpar. Personally I wished it was better at providing up to date information.

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

#223
I don't copy and paste from SO.

I sometimes type what is shown on SO, but not copy/paste, this just sits better with me, I get a deeper appreciatio of what it's doing even if I've read the code and understood it well, and it lets me use names that fit with the program and context of what I'm doing.

Often, I use the example on SO not as the solution, but as inspiration for one, and so I type only a modified subset of it, and at that point, it's just a lot easier to type it yourself than to copy/paste/modify it anyway.

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

#224

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…

> SO had a great strategy initially with relying on search engines to index everything, but it never seems to have solved the recency/relevance problem. In that respect, it has become its own worst enemy, with old answers about obsolete versions and practices often ranking highly in search results.

Oh god yes, this is a nightmare.

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

#225

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 SO used to have really god content for really some fundamental questions which gave it some credibility. As it accumulates more content the quality is really going down - I actively avoid SO unless I can't find any other source. GitHub - literally every problem I have nowdays I spend searching through GH issues, reading through the code upstream and reporting back. For example I wa…

> SO used to have really god content for really some fundamental questions which gave it some credibility.

The moderators' refusal to allow "opinion-based" questions has been very harmful to the usefulness of the site. Now you can only find best practices if someone happens to add them as a tangent. Or if you happen on an old one that got 1000+ upvotes before the mods decided theory was off topic.

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

#226

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 do: Yesterday when I was looking up how to declare and use arrays in bash for the 1000th time. Bash is probably the #1 reason I end up there through a search. After 25 years professional experience (plus 12 years before that), there are a number of reasons why I search for "how to do X in Y" online at least once a week: - The language is poorly designed and has a lot of unintuitive, unorthogonal, difficult-to-remem…

man.. I literally just did a job interview where I was asked if I had bash scripting experience, which I do, and my number one thought was "please for the love of god don't ask me how to do anything with it other than pseudocode / general sys adm work'.

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

#227
Stack Overflow suffers from Internet Ossification. Thousands of posts in the search engine but most are for obsolete questions. So lots of chaff shows up.

Sometimes its a melancholy thing - looking for a latest-version issue and some 12-versions-back question shows up from 2002. Still unanswered and I think of that poor soul still hoping for some direction after all these years!

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

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

Related: http://xahlee.info/python/quality_docs.html | http://xahlee.info/comp/which_programing_language_has_best_d...

It's curious, despite not a example of a great language, PHP has great documentation.

I tried Pharo, and a great functionality there I miss in other languages, is the search by example ability. Saves a lot of visits to stackoverflow. See for example:

https://avdi.codes/in-which-i-make-you-hate-ruby-in-7-minute...

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

#229
post #73

Earlier quoted context omitted.

and lord help you when you are on page 6 of a google search and not finding it... :(

I would take that as evidence that I'm not doing something common, which is soft evidence that I'm not doing it the right way. I haven't had to do anything really novel, mostly I just have to do various forms of plumbing.

Oh no disagreement there. I usually end up there because of some odd error code from some code someone else wrote. If I am lucky I have the source code (not always). But 99% of the time whatever you are doing wrong is in the first 5 or so posts returned. But you get desperate sometimes :)

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

#230
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?

I was in school when they started charging for it, and then it kind of just fell off my radar until I remembered about it now.
Post reply on HN