4 ms·
I think on the whole, stackoverflow has vastly improved overall global code quality. Even if you just limit it to people largely taking solutions wholesale fro
by _vertigo 5y ago
I think on the whole, stackoverflow has vastly improved overall global code quality.
Even if you just limit it to people largely taking solutions wholesale from SO, I still think that it’s a good jumping off point. Of course it’s a mistake to not make any modifications or look deeper than the whatever is in the snippet, but the snippet is often much better than what a noob would come up with.
Also, it’s an opportunity for learning new patterns that you might not have come up with yourself.
- lucideer 5y ago> Even if you just limit it to people largely taking solutions wholesale from SO, I still think that it’s a good [...] I would respectfully disagree on this point. Anything that perpetuates doing this in any way will always have a negative impact on code quality. If an engineer is copying solutions wholesale, even if those solutions are robust and high-quality, that's an indicator of the approach they have to producing code on a daily basis, which is going to have a much larger overall impact than that 1 answer on SO. SO is imo a net positive benefit to the community, but only by virtue of them doing other beneficial things that balance out with the harm of copypaste programming. But I don't buy that copypaste programming is benign. > Also, it’s an opportunity for learning new patterns that you might not have come up with yourself. Blind copypaste is by definition not an opportunity to learn, because you need to understand (hack/fork/adapt answers given) to learn from them.
- BiteCode_dev 5y agoWhy do everybody keep repeating "blind" everywhere? Like it's a curse that can't be avoided. Also why all the anti-copilot seems to think their code is great, or even well understood by themself. I have counterexamples everywhere around me all the time for these 3 points.
- lucideer 5y ago> Why do everybody keep repeating "blind" everywhere? "Blind copypaste" is just slightly more specific thing than just "copypaste". Copypasting code you fully understand and trust is fine (though in practice, is the rarer case). "Blind copypaste" implies you know it works(ish?) and don't care as much about the how. > Also why all the anti-copilot seems to think their code is great, or even well understood by themself. My code is certainly not great, but I like to think I understand what I've written pretty well (there are many contributors to poor quality code, not understanding what you're writing is just one potential one). I also like to think that, while it's not great, it's on average going to be better than code put together by someone who doesn't fully understand what they've written. > I have counterexamples everywhere around me all the time for these 3 points. Do you? By what metric do you consider them counterexamples?
- tynpeddler 5y ago> But I don't buy that copypaste programming is benign. Copypaste programming doesn't have to be benign in order to be better than the likely alternatives. The people who blind copy/paste are likely not producing high quality code in the first place. In which case, blind copy/paste is often an improvement.
- jandrese 5y agoI think of StackOverflow as basically crowdsourced documentation. In a perfect world the documentation that comes with your tools would be complete, correct, and readable. Unfortunately in our world this is often not the case and people end up having to do one of three things: 1. Delve into the original source to see what happens (or reverse engineer the binary) -- very time consuming! 2. Guess. Maybe write some test apps to play around with it till you get it working. This used to be very common, but leads to situations like the PS2 encryption algorithm being completely broken because the devs didn't understand the IV parameter.[1] 3. Go on StackExchange and find an example of what you are trying to do, usually with some helpful discussion about the parameters. [1] You would think security libraries would have the best documentation because it's so important to get it right and difficult for the developer to detect mistakes, but I've found the opposite to be the case. They're some of the worst offenders for just showing you a cryptic function prototype and assuming you know everything about the underlying math already. It feels like the crypto guys think if you couldn't write your own crypto library then you aren't good enough to use theirs, kind of missing the point of libraries.