Any text that makes up a program (that a compiler compiles into an executable form) is called "source code". What I'm asking is why is it called "source code" instead of just "source"? Why is it often called just "code"?
Any text that makes up a program (that a compiler compiles into an executable form) is called "source code". What I'm asking is why is it called "source code" instead of just "source"? Why is it often called just "code"?
Well, it can also often just be called "source" (i.e. "sourceForge" or "can I see the source for that?"). Technically though, "source" can refer to any original resource of the application, such as code, text, documentation, images, object files etc. Usually, when specifying "code" in the context of an application, it is understood that you are most likely referring to the code of that application (i.e. "source" code) and so the "source" might be ommitted. Most of the time the word "source" will be included to signify the totality of the context (i.e. not just a specific module or routine, but the entire application). But all nomenclature and semantics aside, many times the word "source" is just included for the coolness factor as in Valve's "Source" engine.
My question is why is it called "code"?
Looking at the formal definition of code, it makes sense.
Computers. the symbolic arrangement of statements or instructions in a computer program in which letters, digits, etc. are represented as binary numbers; the set of instructions in such a program: That program took 3000 lines of code. Compare ASCII, object code, source code.
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
Thanks. That's all I wanted to know. The English language is quite screwy. There's a set of "standard" rules but some words don't follow them or break them.
If you wanted to know why the word "code" is used (instead of why "source" is often redundantly included), then it is actually *not* the result of any malformed English, but in fact is quite proper English. You see, when you create a "program" for a computer you are communicating with it. More specifically you are giving it instructions to accomplish some abstract task. Conceptually, it is no different than communicating with any other entity (such as a human) except that your encoding of the information differs. When communicating with a human, we encode information into that person's language. When we communicate with a computer, we encode information into a language understood by the compiler (a subset of English in the case of C) which is inturn encoded into assembly language understood by the assembler which is inturn encoded into binary, which is understood by the computer. From this, and the defintion of code:
you can see how it has easily adopted a definition for use in the context of computing: quite literally, "code" means the system of symbols, letters, and words that we use to communicate with the computer (or rather its corrispondent, the compiler). So "code" turns out to be a very apt term for the collection of these symbols that constitutes the information that is our "program".Originally Posted by American Heritge Dictionary of the English Language 3rd Ed.
Last edited by @nthony; 05-09-2007 at 01:08 AM.