News for hackers. Stuff that matters.
Re:How often do people copy and paste from Stack Overflow? by dkersten on Monday April 19, 2021 @06:17PM (#26868511)
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 that either I'm super comfortable with or is niche enough that there's not that much on SO that's helpful. Looking in my browser history, the last thing I looked for that I got an answer on SO is what's the differences between C++'s std::scoped_lock and std::unique_lock, which was a few days ago. I still use SO, just not as frequently as a few years ago.

Re:How often do people copy and paste from Stack Overflow? by kstenerud on Tuesday April 20, 2021 @12:08AM (#26870566)
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-remember parts or nasty footguns, but people continue using this beast-that-cannot-be-slain out of industry inertia (like Bash or CMake).

- The language is in a constant state of flux, adding new features and best practices / idiomatic things, and the cruft-that-must-not-be-used buildup is so insane that even a few years out of the loop makes you feel like a complete beginner (like C++ or Python or JS).

- The language is complicated enough that unless it's your day job you won't remember how to do basic things after a few months away (like Rust or Haskell or Gradle).

- It's been 10 years since you touched it and how the hell do you concatenate a string again???

I think the only languages I can just slide right back into are Java, C#, LUA, and Go (and C, but probably only because I used it daily for decades).

Re:How often do people copy and paste from Stack Overflow? by stevehawk on Tuesday April 20, 2021 @09:03AM (#26874016)
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? by tpoacher on Tuesday April 20, 2021 @03:23PM (#26880037)
man bash

woefully underused, but has everything and is extremely well written with no fluff.

Re:How often do people copy and paste from Stack Overflow? by Silhouette on Monday April 19, 2021 @06:51PM (#26868748)
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/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.

The first of those problems then exacerbates the second, because the same cultural issues get in the way of both updating answers to old questions and asking new questions that might be superficially similar to ones that already exist but actually need a different answer.

Meanwhile, in many areas of programming, documentation from other sources has become both better in quality and more readily located thanks to other well-known sites and high search engine rankings. Relatively speaking, SO simply isn't as useful if there is already primary documentation that answers questions correctly and comprehensively.

And finally, you personally may have grown as a developer over time, becoming both more capable of solving problems for yourself and more familiar with whatever tools you use regularly, so you might not need external help so often.

FWIW, I'm also in the "rarely visit SO any more" camp. I think I have a kind of banner blindness for SO hits on search results pages now, perhaps because I'm assuming that following a SO link is unlikely to provide a useful answer so I almost always check other plausible sources first. On those occasions when I do get as far as visiting SO, I'm usually reminded of why I tend to work this way now.

Re:How often do people copy and paste from Stack Overflow? by troutwine on Monday April 19, 2021 @08:07PM (#26869266)
> 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.

This rings very true to me. The GP's comment made me consider that I very rarely go to Stackoverflow anymore, no longer contribute and what stuff I do find there useful is from well before the cultural shift in moderation, back when questions could be a little more open and answers a little more freewheeling.

Re:How often do people copy and paste from Stack Overflow? by nerdponx on Monday April 19, 2021 @08:12PM (#26869300)
It's a wasteland now. Legitimate, perfectly answerable questions get hostile comments and close votes.

The other sites in the Stackexchange network aren't nearly as bad, fortunately. English Language Learners and Math/MathOverflow are very positive places. Software Engineering is pretty good, too.

Re:How often do people copy and paste from Stack Overflow? by flukus on Monday April 19, 2021 @11:23PM (#26870355)
There's also a lot of people karma farming (for employment reasons?). A couple of years ago I was searching for something and the same question was asked by someone else on SO and this came up repeatedly while I was looking, but after 4 years there was no answer so it was a very low quality result. A couple of days later I did find/discover an answer so I went back to SO and added my reply, miraculously after 4 years someone else added an answer about 12 minutes later, it was the same answer as mine with a little more formatting and marked themselves as correct.

So after that experience would I go to the effort of contributing back again? Maybe in this case, because the answer was shorter than this post, but the equation might change if it required more effort.

Re:How often do people copy and paste from Stack Overflow? by dkersten on Tuesday April 20, 2021 @12:29AM (#26870675)
I actually deleted my account some time ago via GDPR request. So I haven’t contributed in a long time (but wasn’t a heavy user anyway). But I have noticed a major decline in my using it at all, even for just reading answers. Yes, I did look up that C++ thing a few days ago, and ended up finding the answer on SO, but before that, I have no idea when I used it last. Could be months.
Re:How often do people copy and paste from Stack Overflow? by fnord77 on Monday April 19, 2021 @11:19PM (#26870336)
There are weird people on SO who are both trolls and knowledgeable. There is one person who edits EVERY SINGLE question regarding a certain programming language. Then attempts to close every question as "already asked", even where it is somewhat questionable whether it had been asked already or not. He knows his stuff really well though so he ends up not getting banned.

I do not get it.

Re:How often do people copy and paste from Stack Overflow? by svnpenn on Tuesday April 20, 2021 @12:45AM (#26870768)
If you're talking about Flimzy, yeah, he's a tool.
Re:How often do people copy and paste from Stack Overflow? by fnord77 on Tuesday April 20, 2021 @11:56PM (#26885262)
ha, no somebody else. maybe this um, personality quirk is not uncommon.
Re:How often do people copy and paste from Stack Overflow? by physicsguy on Tuesday April 20, 2021 @06:38AM (#26872890)
> 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? by ollysb on Tuesday April 20, 2021 @02:58AM (#26871520)
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? by baud147258 on Wednesday April 21, 2021 @09:10AM (#26889179)
> 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.

I think the SO leadership is currently searching for a solution with this issue. Whether they deploy it and it works is another matter.

Regarding the moderation and unwelcoming culture, I don't really see it, but maybe it's because I follow different tags?

Re:How often do people copy and paste from Stack Overflow? by Spooky23 on Monday April 19, 2021 @09:17PM (#26869722)
Once SO killed expertsexchange and similar sites, it became less useful to me!
Re:How often do people copy and paste from Stack Overflow? by sdan on Monday April 19, 2021 @09:22PM (#26869753)
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.
Re:How often do people copy and paste from Stack Overflow? by kornish on Monday April 19, 2021 @10:35PM (#26870134)
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
Re:How often do people copy and paste from Stack Overflow? by saagarjha on Tuesday April 20, 2021 @03:51AM (#26871853)
It will also download repos for you if you point them at it.
Re:How often do people copy and paste from Stack Overflow? by sjtindell on Monday April 19, 2021 @09:42PM (#26869848)
I’m finding GitHub files and blog posts dedicated directly to my topic more and more, even relatively minor questions or function syntax.
Re:How often do people copy and paste from Stack Overflow? by muglug on Monday April 19, 2021 @07:08PM (#26868863)
StackOverflow is great when you don’t know where to start looking for a solution. Whenever I’m in a new domain I’ll spend a lot of time on SO, spending less time there as I get more comfortable.

Put another way, I spend 100% less time in high school than I used to, but HS is still a valuable resource.

Re:How often do people copy and paste from Stack Overflow? by dan-robertson on Monday April 19, 2021 @07:15PM (#26868913)
I also use stack overflow very little but I think it’s much more easily explained by my personal habits than changes on the site.

When I used stack overflow more, I was doing stuff with web technologies and Unix command line tools. These days I’m much more experienced with Unix tools; I use more specialised tools that aren’t mentioned on SO, use a programming language which isn’t often mentioned on SO, and a large array of libraries which are even less frequently mentioned there. I’m also generally better at finding my own way around—digging through code, jumping to definitions, looking up errors. I think the reason I don’t use it so much is that it is less useful because it doesn’t have the answers I care about and because I have fewer questions for it to answer.

Re:How often do people copy and paste from Stack Overflow? by dkersten on Tuesday April 20, 2021 @12:26AM (#26870655)
That does sound a bit like me too. I use tools that I’m e it her familiar with enough not to need SO, or that are too specialised or niche for SO to be useful. I have no problem reading documentation or just diving into the code if all else fails.
Re:How often do people copy and paste from Stack Overflow? by reader_mode on Tuesday April 20, 2021 @12:06AM (#26870554)
>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 was working with .NET framework for a while (~5-6 years back now) and when dealing with closed source frameworks SO was a replacement for support channels. Now even as I'm coming back to a .NET core project - everything is OSS and on GitHub.

Docs also got better, MDN is now defunded by mozilla but where I had to do a SO search for random JS behavior I can now look up decent references on MDN. I think Google got better at indexing documentation as well.

Re:How often do people copy and paste from Stack Overflow? by Noumenon72 on Tuesday April 20, 2021 @08:22AM (#26873597)
> 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? by user1234567890 on Tuesday April 20, 2021 @12:15AM (#26870601)
> I think Google got better at indexing documentation as well

I think this is it. I also thing documentation in general has gotten a lot better at answering questions rather than being just an autogen api doc site.

Re:How often do people copy and paste from Stack Overflow? by MattGaiser on Monday April 19, 2021 @11:28PM (#26870382)
Sure it wasn’t just autocomplete? Autocomplete eliminates half my reasons to visit SO.

Previously you had to know the function you wanted to call. Now you can just scroll through the functions from typing the dot.

Re:How often do people copy and paste from Stack Overflow? by dkersten on Tuesday April 20, 2021 @12:20AM (#26870631)
I don’t rely on autocomplete quite as much as some people, although it for sure helps.

I do think that a big part is that the two things I spend most of my programming time on, one Clojure project and one C++ project, I’m just pretty familiar with at this stage. I’ve been using Clojure for ten years and the language hasn’t changed all that much, so I don’t need to look things up often (besides the occasional reference material on clojuredocs). For libraries, I check their readme’s and just read the code. I’ve actually never really used SO for clojure, now that I think about it. The Clojure project I’m working on is also a little bit niche, so I don’t tend to find anything useful on SO for it.

For C++, I keep cppreference at hand and only really use SO when I’m trying to figure out weird things, or newer features I’ve not yet used much. Again, for the libraries I use, it’s a mixture of documentation and reading headers and it’s rare that SO helps there.

In my previous job, I was mainly working with AWS services, terraform and some python (using boto) and, again, I had everything I needed from their documentation. Before that, it was Java with some Clojure, but again, the challenging part was the domain, which was nothing that SO could have helped with. Everything else, we had under control.

Maybe I got better at reading documentation?

Re:How often do people copy and paste from Stack Overflow? by closeparen on Monday April 19, 2021 @11:34PM (#26870413)
The quality of autocomplete that's possible has a lot to do with the type system.
Re:How often do people copy and paste from Stack Overflow? by 7thaccount on Wednesday April 21, 2021 @02:33PM (#26893665)
Same. Sometimes I forget a function name or method call (especially when using a language I use rarely) and just use stack overflow for the example and as soon as I see it I'm like "ahhh". No need for copy/paste.
Re:How often do people copy and paste from Stack Overflow? by hnick on Tuesday April 20, 2021 @01:12AM (#26870926)
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.
Re:How often do people copy and paste from Stack Overflow? by rolandog on Tuesday April 20, 2021 @04:12AM (#26871998)
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.