|
|
|
|
|
by cogs
2646 days ago
|
|
That's what I used to think too. But some (admittedly junior) developers I've spoken to said that there was so much concern about IP theft they weren't allowed to look at other peoples' code (I assume Stack Overflow was an exception). And this link https://academia.stackexchange.com/questions/100081/does-two...
is about someone who was accused of plagiarism because of two lines of code. |
|
In academia, the instructors are attempting to tease out your understanding of the underlying concepts. Cutting and pasting even two lines of code from an online source doesn't show the instructor that you understand the concept.
In development, snipping well-written pieces of code is an efficient use of time, assuming the programmer is competent enough to understand the code they just snipped. We reuse common libraries for the same reason; once you solve a problem with a testable, proven solution, it's not a good use of time to have every developer redo that solution.
The main caveat, as illustrated in another comment in this thread, is the issue of licensing. Although I certainly have snipped from good stackoverflow answers, the times I build my own libraries from scratch I often crib from well-proven open source solutions with permissive licenses instead of rolling my own. It should be standard practice (and I recognize that I'm preaching to myself as much as anyone else) to reference those snips, not only for IP integrity but to provide a trail of breadcrumbs for your future self (or anyone else investigating your code) as to where that code came from and the rationale for it.