I completely agree with you and frankly I'm shocked to see most of the responses here purporting copy-pasting someone else's code to be a legitimate practice. I also imagine that most if not all of these people are into web developed where there's a long history of copy-pasting snippets of code and no one knows what he's really doing. I've seen many people write a jQuery script for their website and calling themselves developers. You're not a developer, you're mashing together tools you don't really know how to use in the hope that everything works out. On the browser you're working with a single thread, in the real world you're always dealing with multi-process/multi-thread programs that inevitably lead to race conditions and deadlock. I doubt anyone involved in systems programming thinks is normal to copy and paste code to "get things done", it's just not gonna work.
Same. I'm actually a little shocked HNers think regularly coping and pasting code snippets off the web is ok. That's, kind of crazy.
This is bad especially for young developers (such as myself). Not to mention jeopardizing the security and integrity of your software project.
I hear 'don't reinvent the wheel' often written in blogs etc. That is not good. The lazy developer would read that and go, 'oh, I dont need to know how these things work, it's already been done for me. I'll just slap A to B, no need to reinvent anything'
Imo how it should read instead is, 'keep reinventing the dam wheel till you understand how it was made, only then you're free from reinventing it'.
> I'm actually a little shocked HNers think regularly coping and pasting code snippets off the web is ok
I'm not surprised.
Ever observe threads about software engineering? They're profoundly anti-intellectual. HN is not the place to get any sort of engineering advice, I'm afraid. It's tailored towards self-promotion via programming. The difference may seem small, but the motives are quite different: mastery (as a developer) vs getting it done.
The HN engineering and programming community seems to me to consist of a wide variety of different groups and types of programmers (coders/engineers/whatever).
It shouldn't be surprising that there is a group who feel "I'll just slap A to B" is a good idea (that's not what happens every time somebody copy-and-pastes, by the way--it's one extreme example, and it's possible to copy-and-paste with a deep and mature understanding of what one is doing). Just like it shouldn't be surprising when certain elements of other groups chime in with comments implying CS is some deeply intellectual study of the fundamental nature of mathematics and logic, and if a programmer isn't treating his Enterprise CRUD App X as a means to engage in a deeply intellectual study or application of algorithms, data structures, and complexity analysis he's doing it wrong, or he isn't a real programmer, etc.
The thing is you can copy and paste code snippets properly and responsibly and try and learn at the same time. Or you can just patch over something and hope it works (a lot of the time it will).
My first job was doing Perl, after studying Java. The Perl cookbook was a godsend, and basically encouraged copy pasting BUT had a discussion on the different methods presented and advantages of each one. I personally found that a very good way to learn.
This is one thing I find nice in the Perl community. I haven't used Perl for a few years now, but I always found PeelMonks a lot better then Stack Overflow, because it encourages the discussions that Stack Overflow discourages. Essentially it encourages the bad type of copy pasting I have described.
You seem very confident of your assessments. To the point you'll even suggest HNers who don't see things as you do are crazy.
Are you aware of the notion that expressed confidence tends toward being inversely proportional to competence? And that this is a key to insightful learning?
You've said you're a young developer, so perhaps you haven't recognized this aspect of mind yet, but there's plenty of solid science (as well as anecdotal examples such as your confidence/competence in this exchange may be) that corroborate the essential truth of this aspect of mind.
Of course, I may well be wrong about applying that knowledge to this scenario, so I'm not going to claim confidence or competence in applying it, just that it seemed apropos. :)
I didn't call anyone crazy, it's the idea of copying and pasting code into a professional project that I think is crazy.
That's how I was schooled by senior devs, whose opinion I have profound respect for. The reasoning is sound to me, I'll stick with it. Unless, someone has better reasons why I should copy and paste code, I would consider it.