Derivative code or Chameleon code is
source code
In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the wo ...
which has been derived entirely from one or more other machine readable file formats. If
recursive transcompiling
A source-to-source translator, source-to-source compiler (S2S compiler), transcompiler, or transpiler is a type of translator that takes the source code of a program written in a programming language as its input and produces an equivalent sou ...
is used in the
development
Development or developing may refer to:
Arts
*Development hell, when a project is stuck in development
*Filmmaking, development phase, including finance and budgeting
*Development (music), the process thematic material is reshaped
*Photographi ...
process, some code will survive all the way through the pipeline from beginning to end, and then back to the beginning again.
This code is, by definition, derivative code. The following procedure can be used to easily test if any source code is derivative code or not.
# Delete the code in question
#
Build (or compile) the project
If the build process simply replaces the source code which has been deleted, it is (obviously) code which has been derived from something else and is therefore, by definition, derivative code.
If the build process fails, and a human needs to re-create the deleted code by hand, this is again, by definition,
hand code.
The
transcompiler
A source-to-source translator, source-to-source compiler (S2S compiler), transcompiler, or transpiler is a type of translator that takes the source code of a program written in a programming language as its input and produces an equivalent so ...
s and other tools which create derivative code, are usually themselves either in part, or entirely hand code.
References
Computer programming
{{Comp-sci-stub