Reference articles on history, science, culture and more
Encyclopedia

Derivative code

Type of source code

Derivative code or Chameleon code is source code which has been derived entirely from one or more other machine readable file formats. If recursive transcompiling is used in the development 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.

  1. Delete the code in question
  2. 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 transcompilers and other tools which create derivative code, are usually themselves either in part, or entirely hand code.

Watch videos about Derivative codeExplainers and documentaries on YouTube (opens in a new tab)

Sources and credits

This article is adapted from the Wikipedia article Derivative code, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.

Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.