News for hackers. Stuff that matters.
Re:Copilot regurgitating Quake code, including sweary comments by mediaman on Friday July 02, 2021 @02:28PM (#27715014)
Who really copies stack overflow snippets verbatim? It's usually just easier to refer to it for help figuring out the right structure and then adapt it for your own needs. Usually it needs customization for your own application anyway (variables, class instances, etc).
Re:Copilot regurgitating Quake code, including sweary comments by blooalien on Friday July 02, 2021 @04:45PM (#27716652)
I don't think I've ever copied code directly from any of the Stack* sites. I generally read all the answers (and comments) and then use what I learn to write my own (hopefully better) code specific to my needs.
Re:Copilot regurgitating Quake code, including sweary comments by corobo on Friday July 02, 2021 @05:36PM (#27717223)
Yeah my experience has always been "ohhh that solution makes sense" then I go write it myself

If nothing else this whole copilot thing is helping ease some chronic imposter syndrome

Re:Copilot regurgitating Quake code, including sweary comments by bartread on Friday July 02, 2021 @05:11PM (#27716928)
Ha! Well, I think a lot of people copy code from StackOverflow verbatim once at least - including me.

Of course it turned out the code I'd blindly inserted into my project contained a number of bugs. In one or two cases, quite serious ones. This, even though it was the accepted answer.

It was probably more effort to fix up the code I'd copy pasta'd than write it from scratch. Since then I've never copied and pasted from StackOverflow verbatim.

Re:Copilot regurgitating Quake code, including sweary comments by canadev on Friday July 02, 2021 @03:14PM (#27715604)
Yeah! I've uh, ... never copied a bit of code into my repo verbatim, right?

yeah right. I wish.

(Not saying every dev does this)

Re:Copilot regurgitating Quake code, including sweary comments by TillE on Friday July 02, 2021 @04:01PM (#27716129)
I've copied plenty of Microsoft sample code verbatim, because the Win32 API sucks and their samples usually get the error handling right.

But, I can't think of a single scenario where I've copied something from Stack Overflow. I'm searching for the idea of how to solve a problem, and typically the relevant code given is either too short to bother copying, or it's long and absolutely not consistent with how I want to write it.

Re:Copilot regurgitating Quake code, including sweary comments by Noumenon72 on Friday July 02, 2021 @05:49PM (#27717367)
"Too short to bother copying"? I copy single words of text to avoid typing and typos. I would never type out even a single line of code when I could paste and edit.
Re:Copilot regurgitating Quake code, including sweary comments by vanous on Friday July 02, 2021 @10:51PM (#27718989)
> "Too short to bother copying"? I copy single words of text to avoid typing and typos. I would never type out even a single line of code when I could paste and edit.

Very honest suggestion: learn how to touch type. You can still copy if needed, but your typed input will be much faster.

Re:Copilot regurgitating Quake code, including sweary comments by Noumenon72 on Saturday July 03, 2021 @01:02AM (#27719481)
I'm somewhere between 45-75 wpm. But Ctrl+C Ctrl+V can type 300wpm!

Typing when you could paste is like having that Github Copilot put the right sentence right in front of you and you decide to type over it instead. Not only does it feel like wasted and robotic effort, typing everything leads to RSI.

I'm not sure why people disagree. Another symptom is that I insist on aliases for everything while others type out all the commands every time. Maybe I get distracted by the words when I type and lose my train of thought?

Re:Copilot regurgitating Quake code, including sweary comments by Retric on Saturday July 03, 2021 @10:23AM (#27721803)
You need to highly the correct test first and move the curser to the correct location to paste text. I bet you can type 123123 several times faster than you can highlight that text in this comment and past it into a reply.
Re:Copilot regurgitating Quake code, including sweary comments by ec109685 on Saturday July 03, 2021 @03:37PM (#27724157)
Double click to select a word is fast, and then you are in per word selection mode.
Re:Copilot regurgitating Quake code, including sweary comments by Retric on Saturday July 03, 2021 @05:06PM (#27724917)
Sure, move mouse to text, double click, ctrl-c, ctrl-v it’s still slower than touch typing one word.
Re:Copilot regurgitating Quake code, including sweary comments by alisonkisk on Friday July 02, 2021 @07:31PM (#27718108)
That's fair use.
Re:Copilot regurgitating Quake code, including sweary comments by dvfjsdhgfv on Thursday July 08, 2021 @06:04AM (#27770075)
Same here. I copy boilerplate code for new projects etc. regularly. But I don't remember copying anything verbatim from SO. Function, argument and variable names rarely fit the scheme used in the particular project I'm working on at that moment and usually I do a better job at adapting the code thinking what I'm doing rather than just copy and paste and then wonder what went wrong.
Re:Copilot regurgitating Quake code, including sweary comments by baud147258 on Friday July 02, 2021 @06:00PM (#27717470)
I think I did a few times, usually for languages that I wasn't going to spend to much time with (so no benefits in figuring how to do it from the answers) and for specific tasks.