Do you copy and paste code from Stack Overflow?

Ben Sinclair - Oct 1 '18 - - Dev Community

I always hear about developers running into trouble because they blindly copy-paste code in from places like Stack Overflow answers without understanding what the code is doing.

For instance, it's brought up most recently in an article here called How to Improve Your Debugging Skills. It's a good article, go read it.

But I'm curious now. When I find an answer to something that had me stumped, I learn from it, understand it, and implement it in my own way. The idea of copying and pasting code straight into my own work seems alien. If nothing else, it would at least need to be refactored to use my variable naming conventions or put into a class or method or something instead of being bare code.

I'm using Stack Overflow as the biggest example, but I don't really mean to limit my question to that one site.

Have you ever pasted anything in like that? If so, are you new to development or an old hand - and has your attitude changed over time?

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .