I believe that everyone who writes software of any size will reuse code written by someone else at some time. I’m talking about referring to a library or API, but to copy & paste reuse; fully adopting someone else’s source code. Further, I believe that there are lots of great reasons to do so. Developers are quite used to performing internet searches or using dedicated code repositories to locate candidate code snippets that they will import into their projects in whole or part, and possibly modify to their own purpose.
Much of the code you’ll find this way is freely available (it will cost you no money), but may have additional licensing requirements that you should be aware of and conform to. One of the most common requirements is attribution.
attribution (noun) The act of attributing, especially the act of establishing a particular person as the creator of a work of art.ref
In today’s entry, I’m going to make a case for including proper attribution for all the third-party code we reuse, and suggest a consistent way to do so. My examples will focus on Google Apps Script, but this can apply to any programming language.