Don't Reinvent the Wheel
Even though programming is a relatively new profession, the explosion of programmers and code in recent years has given us a unique opportunity to learn from others. Code sharing websites such as GitHub and StackOverflow contain great examples of how to do both simple and complex tasks in code, usually complete the detailed explanations of how each program functions.
So, as developers today, it is often important to remember the mantra “don’t reinvent the wheel” when writing our programs. While it may be tempting to build everything ourselves, many times the language comes with packages or modules with exactly what we need.
In other cases we may find third party packages/modules online. If we are careful about where we find that code, we can even find a version that is better written than we could do ourselves!
When using code found online, there are several important things to keep in mind
Licensing
Most, but not all, code available online includes a license that describes how the code or software may be used. As a developer, it is your responsibility to read, understand, and abide by the terms of the license you find. For example, some licenses may allow you to use the code in any way you want, even in a paid application, while other licenses require you to make your code open source if you choose to use their code.
By way of example, the CC-curricula often uses a testing extension called Hamcrest. These packages are covered by the BSD-3-Clause open source license.
Plagiarism
Additionally, even when using code that is licensed, there is still the matter of plagiarism. It is always a good idea to cite any sources of code that you didn’t write yourself, no matter how small. In this course, and in most classes in academia, you should always check with your instructor or read the syllabus before using code you didn’t write.
-
File:Roue primitive.png. (2019, January 8). Wikimedia Commons, the free media repository. Retrieved 17:50, November 26, 2019 from https://commons.wikimedia.org/w/index.php?title=File:Roue_primitive.png&oldid=333994349. ↩︎