News for hackers. Stuff that matters.
Re:Don't encode POST bodies like GitHub Copilot, use URLSear... by vincnetas on Thursday July 01, 2021 @08:23AM (#27698384)
Let's agree that copy/paste from stack overflow is bad, and don't use "but people are already doing this" to justify copilot approach.
Re:Don't encode POST bodies like GitHub Copilot, use URLSear... by tailspin2019 on Thursday July 01, 2021 @09:28AM (#27698825)
> Let's agree that copy/paste from stack overflow is bad

I think context is important. It's not inherently bad. If you are inexperienced or don't know what the code/command is doing then yes that's not ideal.

But competent developers using Stack Overflow (and all other external memory devices) appropriately to aid their workflow is perfectly valid.

I rarely copy/paste verbatim from Stack Overflow (apart from perhaps bash commands where the answer is literally the exact command I need - and in that case, why would I not use it?). But I do copy/paste, as long as I understand the code, and then adjust it accordingly.

In my experience of coaching junior devs. The number one skill I've had to train them in, above all else, is the ability to efficiently search for and find answers to their questions/unknowns quickly. (As well as digest those answers and incorporate the knowledge into their understanding - not just blind copy/paste).

I'd go as far as to say that If you are a developer in 2021 and not constantly looking up things for reference (whether to jog your memory or to quickly learn new concepts) then you're either a genius with a photographic memory, working in a very constrained domain that isn't stretching you or you're just plain doing it wrong. :-)

Re:Don't encode POST bodies like GitHub Copilot, use URLSear... by BiteCode_dev on Thursday July 01, 2021 @08:39AM (#27698509)
I don't agree. I use it all the time. I just don't do it blindly.
Re:Don't encode POST bodies like GitHub Copilot, use URLSear... by addicted on Thursday July 01, 2021 @09:44AM (#27698967)
I'll add that with SO it's always helpful to read a few answers below the accepted ones.

There's always almost some nuance that the accepted answer might be lacking or you should know about that is mentioned.

Re:Don't encode POST bodies like GitHub Copilot, use URLSear... by midev on Thursday July 01, 2021 @01:47PM (#27702044)
Sometimes I do it blindly too! I don't always care about the "how". Sometimes I'm just looking for a single line to convert a data type, or a bash command to do something. Not interested in learning all the arguments to various bash tools. I just want to delete some files and move on.
Re:Don't encode POST bodies like GitHub Copilot, use URLSear... by YetAnotherNick on Thursday July 01, 2021 @08:31AM (#27698452)
> don't use "but people are already doing this" to justify copilot approach.

Why not? Most of the software is not built by checking the formal verification of specification but by looking into the code and having reasonable understanding that it works. Also there will be errors in the code whether we use copilot or not. Personally if I don't have an option to do a build and run and look into the output, I am reasonably sure that there is at least one bug in something like every 50 lines.