Code (computer programming)
|
In computer programming, the word code refers to instructions to a computer in a programming language. In this usage, the noun "code" typically stands for source code, and the verb "to code" means to write source code, to program. This usage may have originated when the first symbolic languages were developed and were punched onto cards as "codes".
Engineers often use the word "code" to mean a single program. They might say "I wrote a code" or "I have two codes". No software engineer or computer scientist would say that. They would say "I wrote some code" or "I have two programs". Since English allows virtually any word to be used as a verb, a programmer, or coder might also say I coded a program; but, since a code can stand for multiple concepts, that coder might say I hard-coded it right into the program, as opposed to the metaprogramming model, which might allow multiple re-uses of the same piece of code to accomplish multiple goals. Thus, the coder might instead soft-code a concept, which ensures that it will have a longer lifespan than a hard-coded concept.
Mechanical engineers use a "Numerical Control Code" (NC Code), such as G code, to tell CNC machines how to cut raw material into the desired shape. G code is one of many programming languages.