Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Programming

How Often Do People Actually Copy and Paste From Stack Overflow? (stackoverflow.blog) 124

Stack Overflow blog: They say there's a kernel of truth behind every joke. In the case of our recent April Fools gag, it might be more like an entire cob, perhaps a bushel of truth. We wanted to embrace a classic Stack Overflow meme and tweak one of our core principles. Our company was inspired by the founders frustration with websites that kept answers to coding questions behind paywalls. What would the world look like if we suddenly decided to monetize the act of copying code from Stack Overflow? Ok, jokes over, hope everyone had a good laugh and no one got too freaked out. But wait, there's more. Once we set up a system to react every time someone typed Command+C, we realized there was also an opportunity to learn about how people use our site. We were able to catalog every copy command made on Stack Overflow over the course of two weeks, and here's what we found.

One out of every four users who visits a Stack Overflow question copies something within five minutes of hitting the page. That adds up to 40,623,987 copies across 7,305,042 posts and comments between March 26th and April 9th. People copy from answers about ten times as often as they do from questions and about 35 times as often as they do from comments. People copy from code blocks more than ten times as often as they do from the surrounding text, and surprisingly, we see more copies being made on questions without accepted answers than we do on questions which are accepted. So, if you've ever felt bad about copying code from our site instead of writing it from scratch, forgive yourself!

This discussion has been archived. No new comments can be posted.

How Often Do People Actually Copy and Paste From Stack Overflow?

Comments Filter:
  • by Lew Perin ( 30124 ) on Wednesday April 21, 2021 @02:49PM (#61298042) Homepage

    ...but it creeps me out that Stack Overflow is recording everything I do on their site.

    • by LifesABeach ( 234436 ) on Wednesday April 21, 2021 @02:57PM (#61298078) Homepage

      curious.
      how do you feel about google and facebook and amazon

    • Ha! (Score:5, Insightful)

      by Gravis Zero ( 934156 ) on Wednesday April 21, 2021 @03:00PM (#61298092)

      ...but it creeps me out that Stack Overflow is recording everything I do on their site.

      You're just creeped out because Stack Overflow is being open about what they are doing. Just about every site is monitoring you but the difference is that they aren't telling you about it.

      • Re: (Score:2, Insightful)

        by Anonymous Coward

        This. Obviously the site knows what you clicked on. When. How long. What you looked at. Where you hesitated and reconsidered.

        None of this gives a flying fuck about your phone's logo or your OS. If you're running a mainstream/unhardened browser, you're at the bottom just as much as grandma. If you're on any mobile OS, good luck hardening anything significantly. There's a long list of checkboxes to tick and all that does is move you up the curve - at the top (there isn't one really) neckbeards will remind you

        • by ceoyoyo ( 59147 )

          Obviously the site knows what you clicked on, *if it was something on their site*.

          It is not obvious that they know what you looked at, what your mouse was doing, or what keys you pressed.

          When you request an HTML document that's what you get: a document. There's nothing in it that tells the provider what you did with it after. Nothing, that is, except the javascript they embed.

          It would be nice if browsers had an option to allow javascript to execute, but block any requests after the initial page load.

          • Noscript can do this in a roundabout way. Un-set the option to automatically reload the page when changing permissions and you can turn off scripts after loading.

            • by ceoyoyo ( 59147 )

              That's not quite what I had in mind. You can think of legitimate use cases for javascript as you interact with a page that you might like to allow. Blocking any network access after loading would allow that kind of thing but block telemetry. It would also block dynamic requests, but I don't see how you could reliably allow those and also block sneaky advertiser shenanigans.

              • You're right, my proposal is more of the "mark with chalk but cut with an axe" type.

                It's possible to block at the class level with js, but that's one hell of a moving target.

      • You're just creeped out because Stack Overflow is being open about what they are doing. Just about every site is monitoring you but the difference is that they aren't telling you about it.

        Difference being, maybe, that Stack Overflow is used by people who know what it is to be tracked.

    • JavaScript lets websites do some really hinky shit. It's been this way from the beginning. Pop-ups were a bad user experience, but less invasive than what is actually going on behind the scenes these days.

      • by Z00L00K ( 682162 )

        Javascript was never good.

        But if it at least wouldn't allow calls to third party services it could do a considerable amount to limit the privacy issues. I can deal with the fact that the site I access do some analytics of their own to understand their users and hopefully how to improve the site, but when you have a third party your world-wide browsing habits are now part of the statistics.

        When I was doing some development of a site I did look at which user agents that were used in order to know what was imp

        • I think statistics are fine to keep. And there are guidelines in order to keep them anonymous and avoid leaking personal identifying information. For what it's worth this was part of the training I had to take at Google. Now I won't comment on if they actually practice what they preach, but the training was excellent.

          it's tough to make something good at security and privacy if it's not designed up front to do that. JavaScript started off as a bit of a hack to manipulate HTML documents (through DOM access).

    • by AmiMoJo ( 196126 )

      It actually highlights a flaw in their methodology.

      They are monitoring using JavaScript. uBlock stops it, obviously disabling JS stops it. So they are only looking at users too clueless to use a decent ad blocker or privacy enhancer.

  • by Fembot ( 442827 ) on Wednesday April 21, 2021 @02:56PM (#61298074)

    "surprisingly, we see more copies being made on questions without accepted answers than we do on questions which are accepted" - this really isn't surprising at all, it's almost certainly people copying the code from the question to reproduce the issue and figure out a solution. It's also why including a good reproducer for an issue in a question is so important.

    • by Darinbob ( 1142669 ) on Wednesday April 21, 2021 @03:38PM (#61298258)

      Accepted answers are very often wrong on stack overflow. That place seems to be social media site first and foremost, you need a certain social accpetance score to be able to upvote or comment in the first place. The top answer for stuff I look up there is almost always wrong. Number 2 is sometimes right but often also wrong. Very often the most correct answer seems to be down lower and with a tiny number of social upvotes. For example, questions about C often end up with answers that are for C++ instead, and the person who answered probably just skimmed over the question too fast, likely because they spend all their free time on stack overflow answering questions quickly so that they can get their score higher.

      Answers on stack overflow are like watching life hacks on youtube - frequently wrong, sometimes dangerously so.

      • Yeah, there is lots of garbage on the site, mostly when people manually code something that should be already implemented in api or language. But as an experienced programmer I have a feel for this and will keep looking until I find an answer that satisfies me. That doesn't stop me from copying into my code and commenting out to refer to while I create my own version.
      • 90% of the problem is because people can't actually fucking READ the question.

        Like you said "so that they can get their score higher".

        People gaming the system? What could possibly go wrong? /s

      • by Ksevio ( 865461 ) on Wednesday April 21, 2021 @04:58PM (#61298578) Homepage

        What's worse is the review system. Say there's a question about Java and you submit a correction. That then gets reviewed by a random user, possibly someone that only knows python. The default for most people is just to reject a change so that's why incorrect information stays around.

        I once submitted a small correction (variable name was swapped with class name or something) that was reviewed by 4 people unfamiliar with the language who all rejected it before the original post author accepted the change.

        • by AmiMoJo ( 196126 )

          It's worse than that. Once you get to a couple of thousand reputation points you can mark your own homework. Override or reject changes on your own answers.

      • I thought correct answers went into the comments to the original question ;)

    • by Gimric ( 110667 )

      Yep. Measuring the number of copy and pastes probably doesn't measure what they think it does. People aren't generally copying and pasting into their production code, they are either trying to reproduce the issue or copying code into their editor of choice to have a look at the syntax or modify it to see if it does what they need.

      Just because the poster copies code holus bolus into their solution doesn't mean the rest of us do.

    • by ColaMan ( 37550 )

      I copy the second or third most upvoted answer, simply because the first is (usually) a pedantically-long-winded way of doing something that takes into account every single possibility, and all I need right now is the quick'n'dirty hack that I can run to massage a bit of data from *over here* into what I need *over there*.

      Sure if I'm writing something that will last 5 years and have the general public banging on it's inputs, then I'm going to look into things properly and do it the right way.

      But when it's i

    • "surprisingly, we see more copies being made on questions without accepted answers than we do on questions which are accepted" - this really isn't surprising at all, it's almost certainly people copying the code from the question to reproduce the issue and figure out a solution. It's also why including a good reproducer for an issue in a question is so important.

      It is almost certainly not this. The number of people reading questions and answers for information is orders of magnitude higher than the number of those trying to answer the question. If you RTFA you would see that copies come 80%+ from people not logged in, which clearly means they aren't trying to reproduce a problem in order to answer a question, because why would you if you're not going to be able to post an answer.

  • I do it all the time (Score:5, Interesting)

    by Lije Baley ( 88936 ) on Wednesday April 21, 2021 @02:58PM (#61298082)

    I use it as a quick look up / reminder for things I don't want to clutter my memory with. I do have 25+ years of experience though, so I can tell the wheat from the chaff. And for my purposes at least, most of it doesn't deserve the context-ignorant horror stories that code snobs love to tell.

    • I'm in the same boat, 25 years experience I just remember where to find stuff and how things work. It's made interviewing difficult though because I can't rattle off the names of things.
    • by rHBa ( 976986 )
      I rarely copy/paste large blocks of code but I do snippets sometimes. I'll often copy/paste a function or variable name into a google search so I can RTFM...

      It's a stupid question really. I mean what's the alternative, re-type everything you read on Stack Overflow?
    • 12+ years of experience, same here, I have much more important things to fill my brain rather than how to do some trivial stuff in this or that language.
      I found the article pretty pointless. I do copy a lot of code from SO and other places (including my own demo projects folder I compiled over the years), but I never use code as it is. I always understand what it does first and always improve it before use, even because the quality code is frequently awful.

  • One CS teacher I knew loathed stack overflow because his students just copied and pasted. My response is that he shouldnâ(TM)t just copy and paste assignments off the internet. But seriously kids look for shortcuts, and it is just a matter of building in enough original formative assessments to demonstrate that learning is the only path forward.

    When I am looking for a solution, though, stack overflow almost always has a quality example. It is a valuable tool. And illustrates the difference between c

    • by ceoyoyo ( 59147 )

      Or copy and paste the questions that have wrong answers.

      • by Z00L00K ( 682162 )

        The answer might be wrong for the person asking but it might still contain pieces that are useful for me.

        • by ceoyoyo ( 59147 )

          Did you read the OP? He was talking about teachers copying exam questions and students responding by copying answers.

          If you (the teacher) copy questions with wrong answers, you'll quickly find out which students are blindly copying them.

    • by c-A-d ( 77980 )

      One of my profs puts on all his assignments and tests that answers copied from the internet will get a big fat 0.

  • by mykepredko ( 40154 ) on Wednesday April 21, 2021 @03:04PM (#61298114) Homepage

    While I have looked at answers on Stack Overflow I can pretty confidently say that I've never cut and pasted snippets of code from there.

    There are two reasons for that, the first is that I want to understand exactly what the solution is telling me before implementing it - I don't think I've ever seen a checked answer that has been exactly what I'm looking for and while it may give me some idea how to solve the problem I'm not going to take it on faith that the code is correct.

    The second reason it seems there is a 25%+ chance that the checked (marked "correct") answer is wrong. This goes back to the first point and my desire to understand what the answer is, not just take it on faith. Often you can find the correct answer (or at least one that's more helpful) further down the thread but I suspect going beyond the check mark is more than most people are willing to do.

    I'm somewhat on the fence as to how good a resource Stack Overflow is simply because of the poor quality answers but this sounds like many people (I won't call them "programmers") just accept the first (checked) answer because it appears to solve their problem and doesn't fail when they build their source.

    • by Mr. Barky ( 152560 ) on Wednesday April 21, 2021 @03:39PM (#61298262)

      Whenever I copy/paste from Stack Overflow, I validate that it does what I want it to do. I never copy it blindly. I would hope that others do the same. Most of the time I look there is for some specific usage of an API - and just get a little snippet (which I then refactor to suit my purposes better). But who knows, I am sure plenty of people just copy it without thinking about it.

      I am quite a good programmer, at least that is what my managers have told me over many years. But nevertheless, I find Stack Overflow quite useful. But you always have to understand the answer. If you don't, well... there's a problem.
       

      • by vilain ( 127070 )
        I think I used code for a very basic haproxy configuration that did what I wanted for proof of concept and some python code to query a web-site's SSL certificate with just using basic libraries. At most they save time in getting bare bones code running and I could go on to read more in-depth to enhance it. These weren't major projects, just "can this be done" demos. Most of the Stack Overflow stuff I've crawled through was to figure out why something wasn't working, usually an installation or configuratio
    • I've cut and pasted "Code" from SO in the past couple of hours. They were at most twos line, and usually involved obscure parameters to a library function.

      Although I haven't found SO useful for years, until I tried to understand weird counterintuitvie behaviors in webfrontend code just now. In fact, I think SO is mostly useful as documentation for bad, numerous and mercurial frameworks.

    • I have worked for more than one company that worried about open source license issues from copy-paste. While Slashdot has agreements specifying an open source license for all posted code, we worried that the person posting the code may not have had permission to post it.

      With newer developers being eager to impress, they sometimes searched for the fastest way to get working code into the product so they could mark a task 'complete'.

      Another worry; products like BlackDuck often showed matches to open source c

    • by AmiMoJo ( 196126 )

      The questioner gets to select the correct answer. This is obviously daft because often the questioner is not qualified to judge if the answer is any good, and often doesn't care.

      The classic example is an answer that kinda works but is extremely inefficient, causes all sorts of problems elsewhere and is full of bugs. The questioner copy/pasted it into their app, it worked and they marked it as correct and moved on.

    • by AuMatar ( 183847 )

      Copy pasting and understanding aren't mutually exclusive. When I need to do something relatively small and simple, like say request runtime permissions in Android, I will frequently copy paste the code rather than type it up myself, because its quicker than looking up the 3 or 4 functions I need to call who's signature I never remember. I understand what the code is doing, but its quicker to copy than write myself.

      That said, always read the code and understand it. Otherwise you have code that's at best w

    • by Mitreya ( 579078 )

      While I have looked at answers on Stack Overflow I can pretty confidently say that I've never cut and pasted snippets of code from there.

      Students do it all the time!
      And most of the time it fails because of the reasons you describe.
      The solutions are either inefficient or outright incorrect. But the students who just googled the question don't know any better.

  • youngsters (Score:5, Insightful)

    by mustafap ( 452510 ) on Wednesday April 21, 2021 @03:18PM (#61298156) Homepage

    Try to imagine what it was like, for a newly employed software engineer, in the 1980s. Need information? Buy a book.

    Stop fecking complaining, you youngsters don't understand how lucky you are.

    • Re:youngsters (Score:5, Insightful)

      by Mr. Barky ( 152560 ) on Wednesday April 21, 2021 @03:41PM (#61298270)

      Mod up. I'm not a youngster and remember having thick manuals for every library (yes, in the 80s). Having Stack Overflow really makes a lot of things a lot easier. Maybe there are bad answers, but on average it saves a lot of time compared to the old days.

    • We also stored large caches of books in buildings. We called them "libraries". You could read any of them, free of charge and no advertisements!
      • by lsllll ( 830002 )

        We also stored large caches of books in buildings. We called them "libraries". You could read any of them, free of charge and no advertisements!

        So you're telling me that instead of typing something in DuckDuckGo and having an answer to my question in less than a minute, I should walk over to the library, search the catalog, find the book, and hope it has what I'm looking for? All that to avoid an advertisement (which I don't see because of my custom DNS server and my browser addons) and to avoid SE knowing I copied something? I'm also not a youngster and remember looking through catalog style [staples.com] printed System V manuals and man pages because disk sp

    • Try to imagine what it was like, for a newly employed software engineer, in the 1980s. Need information? Buy a book.

      Or if the book didn't exist or wasn't handy, read the code.

      And if the source wasn't available, reverse engineer it from the object.

      (That last got much harder with RISC's delay slots and compiler code optimizers, then gargantuan libraries. Early CISC code tended to be small with coherent instructions and the compiled code followed the structure of the source closely.)

    • Re:youngsters (Score:5, Interesting)

      by LostMyAccount ( 5587552 ) on Wednesday April 21, 2021 @04:09PM (#61298380)

      But remember how lucky we were. The systems were so much simpler then and they officially documented EVERYTHING.

      I remember being in a Control Data office in the 1980s and they had a room with the entire fucking Cyber documentation in 3 ring binders. It took up most of the wall of the room, but if what you wanted wasn't in there, it wasn't part of the system. Commands, options, error messages, even real arcane stuff like power up information.

      Nowadays you're lucky if the vendor even bothers to document even a majority if what the release, and much of it is outright wrong or outdated or both. Cloud stuff is worse, I've been in seminars with Microsoft employees who lose track of features in the Azure UI because of rapid undocumented changes. If they can't keep track of it, who can?

      Back then the coffee was black, the ties were ugly and Frank always had an extra Old Gold for you.

      • Re:youngsters (Score:4, Informative)

        by Jahta ( 1141213 ) on Wednesday April 21, 2021 @05:33PM (#61298694)

        But remember how lucky we were. The systems were so much simpler then and they officially documented EVERYTHING.

        I remember being in a Control Data office in the 1980s and they had a room with the entire fucking Cyber documentation in 3 ring binders. It took up most of the wall of the room, but if what you wanted wasn't in there, it wasn't part of the system.

        Yeah, back in the day DEC VMS was the same. The VMS 5 documentation arrived on a palette and was known as the Big Gray Wall [thefreedictionary.com] because the ring binders were gray. There was also an Orange Wall for VMS 4, and a Blue Wall for VMS 3.

        • I kind of get the idea that rapid technological advance makes quality documentation expensive and perhaps slows the pace of advance. Or at least I get that Microsoft, et al, can get away with thin documentation.

          But it kind of makes me wonder whether the larger economic cost in lost productivity is worth it. If just using something -- a system, an API, whatever, requires a ton of experimentation to fill the knowledge gap created by non-existent documentation, this too inhibits "progress" and decreases labo

          • by Jahta ( 1141213 )

            I kind of get the idea that rapid technological advance makes quality documentation expensive and perhaps slows the pace of advance. Or at least I get that Microsoft, et al, can get away with thin documentation.

            It's true that delivering a palette-load of manuals is not practical these days; it would be too expensive and they would be rapidly out of date. But there's no reason why quality documentation couldn't be delivered in hypertext format; the cost would be low and updates would be easy to deliver.

            But the "move fast and break stuff" ethos seems to consider documentation an afterthought.

    • It really is amazing how far we've come. The one saving grace was that things were simpler. I had the Commodore 64 Programmer's Reference Guide. It was about an inch thick and told you everything you could possibly need to know--right down to instruction timings for the CPU. Such an amazingly readable reference. I wrote an auto-load utility once, and was thinking about sending it in to Compute! magazine. I think they might have even paid you a little bit if it got published. I never did, and then jus

    • Try to imagine what it was like, for a newly employed software engineer, in the 1980s. Need information? Buy a book.

      I had a job that was a mixture of hardware and software in the 80s. It's funny how back then, a major badge of engineering seniority was how many bookcases full of tech manuals you had accumulated in your office (which were actually real rooms with doors!)

      New hires right out of college started off with one empty half-height bookcase. The highest-level "senior fellow" engineers often had accrued four full-height bookcases. I think that I had only achieved two full-height cases before I left, but the number o

    • by ceoyoyo ( 59147 )

      Can't understand the book? Buy another book to explain it!

      I remember a stack of System 7 reference books next to a stack of "System 7 Decoded" type books.

    • Try to imagine what it was like, for a newly employed software engineer, in the 1980s. Need information? Buy a book.

      Stop fecking complaining, you youngsters don't understand how lucky you are.

      As one fellow greybeard to another, bugger off. I remember having a shelf of books (90s, not 80s), and it SUCKED. You hardly got anything done and touching a new tool meant spending $50-60 of money, which work often didn't reimburse, taking a trip to a book store and reading a book, 25% of it is useless crap about getting started. For example, you want to learn Struts?...OK, the first 20% of the book is telling you how to install Java on every platform under the sun. Oh, want to try ANT 1.0? OK, first

    • Try to imagine what it was like, for a newly employed software engineer, in the 1980s. Need information? Buy a book.

      Stop fecking complaining, you youngsters don't understand how lucky you are.

      I started programming in 1976-1977 in high school using computer cards which were sent into a mainframe every night and returned two days later and you know what? There were always people you could talk to/ask when you needed help. Our teacher was a lush and was completely useless, but that didn't mean other kids didn't have parents who knew something or you couldn't call up the specialists in the board to ask questions. You could even work together to figure out what was going wrong.

      Programmers aren't

    • by Gimric ( 110667 )

      By the nineties we at least had Usenet. Now get off my grass!

    • Try to imagine what it was like, for a newly employed software engineer, in the 1980s. Need information? Buy a book.

      Stop fecking complaining, you youngsters don't understand how lucky you are.

      And then you typed things in from the book ... hopefully understanding and tweaking as necessary.

      Copy paste just saves time.

  • I think the more interesting part is what happens after the copy, which SO does not have insight into. Sure I copy from SO, then paste into a text editor and start changing things before the changes get copied into a code base. So what?

    A lot of SO for me a really a documentation search that includes the notes from others. I copy out of documentation too. So what?

  • I normally look up Stack overflow when I am not happy with my solution, so when I do find an option, I tend to pick it apart until I understand it and the logic behind it. Then I would normally recreate it by copy and pasting the original code, then changing it around to match my and the business coding style.

  • by jmccue ( 834797 ) on Wednesday April 21, 2021 @03:38PM (#61298260) Homepage

    I have looked at stackoverflow, but only once or twice I found something useful. I use noscript and since stackoverflow has started showing a very annoying "privacy" popup hiding half the screen, they are dead to me. privacy and stackoverflow, an interesting concept.

    When on OpenBSD, no need for stackoverflow since thier man pages are great. On Linux I would do a google sometimes usually for something I forgot (getting old)

  • know java. sorry for the continuation but I ran out of character. I remember a story from about ten to fifteen years ago that became the top rated java poster who didn't know java. Does someone remember this and can they point to the story or at least give the professor's name? Seems like a good time to ask.
  • Command+C (Score:2, Troll)

    by rpresser ( 610529 )

    Annnnd there's the Mac supremacist, writing "Command+C" in the subtitle of his blog, talking about an experiment that collected data from their overwhelmingly non-Macintosh userbase. (Most questions on StackOverflow.com are either about a non-Mac platform or about a platform-agnostic technology such as HTML or python. I find it hard not to believe that the readerbase is also overwhelmingly non-Macintosh-using.)

  • by Dirk Becher ( 1061828 ) on Wednesday April 21, 2021 @04:01PM (#61298348)

    I don't want to enable algorithms that identify people via typing style.

    • Disable JavaScript. I can't think of any method (outside of the browser itself acting as a keylogger) beyond the site exploiting a vulnerability (or just tricking you into) installing some keylogger, which would enable a website to track your typing style. As long as you're not posting text to it (which is a bit different from trying to identify someone by their typing style) or otherwise giving them data, it shouldn't be possible for the website to gather any data on you in that manner. If the website it j
      • If stackoverflow can recognize one keystroke they can recognize any, right?

        • by ceoyoyo ( 59147 )

          They can't even recognize one keystroke if you disable JavaScript.

          • Most webpages are useless without javascript.

            • by ceoyoyo ( 59147 )

              Not at all. Some are just ugly. Many web pages are more useful without javascript. See paywalls for an example.

              If you mean web apps, the unholy perversion of transmitting interpreted GUI apps over a hypertext protocol, then yes.

  • Uhm, no (Score:4, Insightful)

    by Aighearach ( 97333 ) on Wednesday April 21, 2021 @04:22PM (#61298440)

    So there is a bit of a bait-and-switch here.

    They measured what they can measure; text copy.

    But the headline also talks about pasting, which they can't measure.

    If I'm looking at stack overflow, I usually do copy.

    But where do I paste? Into an internet search engine, to get the "real" answer that explains it more completely.

    • You paste blocks of code into a search engine query?
      • You can paste many things into a search engine query, including blocks of code. I regularly paste compiler warnings, including the code snippet. It often turns up some git commit or github issue. And of course, StackOverflow.

        I don't understand why people don't Google something first to see if someone's already encountered the problem already. Ctrl-C, Alt-Tab, Ctrl-T, Ctrl-K, Ctrl-V, Enter. Takes basically a second.
        • You can paste many things into a search engine query, including blocks of code. I regularly paste compiler warnings, including the code snippet. It often turns up some git commit or github issue. And of course, StackOverflow.

          Compiler warnings/errors, sure. Blocks of code copied from StackOverflow? You really search for those?

      • No, I don't paste "blocks of code," why would you assume that every copy is a "block of code?"

        I paste the formal name of the algorithm, or the name of api methods/functions.

        • No, I don't paste "blocks of code," why would you assume that every copy is a "block of code?"

          Read the summary. The highest number of copies were from blocks of code.

          • Wait, you can't parse the difference between something being a block of code, and being from a block of code?

            I hope you don't code.

            • Wait, you can't parse the difference between something being a block of code, and being from a block of code?

              Copying from a block of code is rarely going to be useful. Searching for keywords, variable names, delimiters, etc., isn't going to find you much. If there's an interesting named algorithm or a useful API function/method, that will typically be mentioned in the text, not the code.

              I hope you don't code.

              Yeah, I'm a n00b. I've only been coding for 40 years, and only 30 professionally. Today I've only written about a hundred lines of code. It would be more, but I'm fighting with a crash in early boot on the OS I whose core I work on

  • by WaffleMonster ( 969671 ) on Wednesday April 21, 2021 @04:58PM (#61298576)

    dom.event.clipboardevents.enabled = false

    • by dargaud ( 518470 )
      Why even is the clipboard accessible from the browser ? What purpose does it have (besides creepy monitoring) ?!?
  • by Snotnose ( 212196 ) on Wednesday April 21, 2021 @05:24PM (#61298670)
    of answering the question I did not ask. A very good answer, mind you. Just doesn't help me solve the problem asked.
  • Going to add system ("\rm -rf/") at the end of a very long comment line. Something like

    /* Nice comment here nothing to see please move along, don't use the horizontal scroll here no need */ { system ("\rm -rf /*");} /* no one reads comments anyways

    some more comment.

    Be nice and explain everything.

    */

    it is not visible in the edit window.

    That will teach them.

  • by JustAnotherOldGuy ( 4145623 ) on Wednesday April 21, 2021 @06:45PM (#61298880) Journal

    "How Often Do People Actually Copy and Paste From Stack Overflow?"

    Too often, that's how often.

    There's nothing wrong with getting code from Stack Overflow if you have a clue as to what you're doing, but a lot of people can't tell good code from shit typed by crack-addicted monkeys.

    Us SO as a learning resource, not the place to cobble together an actual project. There's lots of good stuff there if you can sort through all the cruft and garbage.

    • by Gimric ( 110667 )

      So people are meant to type out code examples long hand? Why would that be better?

      • No, you're supposed to read the code, understand what exactly it's doing, then type out what you NEED.

        I wonder how many bugs get introduced to programs because people copy-paste code from the internet and they didn't do a good job of replacing the identifiers with their own. We already teach coders to avoid copy-pasting code even from their own code for the same reasons, but sometimes it's convenient, especially when you don't have to replace the identifier names and the code snippet already works in con
      • So people are meant to type out code examples long hand? Why would that be better?

        Wow. I have rarely seen someone misunderstand a simple comment so thoroughly.

        What part of "There's nothing wrong with getting code from Stack Overflow if you have a clue as to what you're doing" seemed unclear?

        What part of that suggested anything should be typed out by hand?

        Maybe some reading comprehension courses would help you puzzle this stuff out.

  • So what? (Score:5, Insightful)

    by cascadingstylesheet ( 140919 ) on Wednesday April 21, 2021 @09:58PM (#61299320) Journal
    Knowing what to copy and understanding how to use it and tweak it is what matters.
  • More concerning is how many people accept the top answer, or the accepted answer, without question. I know some people who literally never look beyond the first answer because it never lead them astray "in the past". Except, how do you know it was correct if you didn't look at the other answers and comments that may point out what was wrong with the top? The top/accepted answer may give the end result you were looking for, but that is not the same as being the correct solution.
  • As a career software developer, Stack Overflow is a great tool. But honestly, I rarely copy/paste straight from it. 95% of the time it is a matter of seeing how other people solved a particular problem to give me ideas as to how to solve it in my environment. A canned, complete solution that fits cleanly into my project is rarely available from SO.

    It is a great resource for techniques. Seeing how 5 people solve the same problem gives some great insight as to what is really happening behind the scenes

UNIX is hot. It's more than hot. It's steaming. It's quicksilver lightning with a laserbeam kicker. -- Michael Jay Tucker

Working...