2 ms·
Ask HN: Copy and Pasting from Stack Overflow?
There's a bit of advice out there that generally can be summed up as "Don't just copy and paste from Stack Overflow".
The idea being that it is dangerous to do so if you don't understand what the code is doing.
Obviously, you should understand what the code yo you write does. But I wonder, is a scenario where you copy and paste from Stack Overflow, the code works, and you do NOT know what the code does even likely?
Personally I find I always fiddle with any code I find on the internet, or anywhere, a bit anyway to figure out how it works AND to make it work for my given situation. Especially with Stack Overflow and JavaScript as the language has changed and SO just loves to mark things duplicate in favor of some many years old threads ... with jquery (but that's a different topic).
Has anyone had a situation where they (or a friend...) just copied and pasted from Stack Overflow, it worked enough to get used in production, but they didn't actually understand it and it came back to bite them?