DEV Community

Discussion on: copy and paste , with or against

Collapse
visum profile image
Benjamin

I don't think asking "is copy/paste good or bad?" is quite the right question. The question is, "do I understand what my code is doing?" As soon as you put code into your project, whether you wrote it or grabbed it from Stack Overflow, you are responsible for it. If you have no idea what

eval(atob("ZGVzdHJveUFsbFRoZVRoaW5ncygp"))

does and you use it anyway, you are being irresponsible and the only thing you'll learn is that you can't trust everyone on the Internet.

However, if you are using SO as a way to learn what you don't know, and you take the time to understand what the answers actually mean, it can be a great tool. Often the answers won't fit your need directly, and you'll end up rewriting them a little bit to fit. You can't do that if you don't know how they work.

In other words, the shortcut that you're taking shouldn't be to just get the job done faster (though that will happen). You are going to avoid some time beating your head on the desk, not knowing where to start with some problem. There is a lot of experience on the Internet that you can use to kick-start and supplement your own experience - use it!