Program source "code"?

This is a discussion on Program source "code"? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Any text that makes up a program (that a compiler compiles into an executable form) is called "source code". What ...

  1. #1
    Math wizard
    Join Date
    Dec 2006
    Location
    USA
    Posts
    582

    Program source "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"?

  2. #2
    Registered Abuser
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    591
    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.

  3. #3
    Math wizard
    Join Date
    Dec 2006
    Location
    USA
    Posts
    582
    My question is why is it called "code"?

  4. #4
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    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.

  5. #5
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    Quote Originally Posted by ulillillia View Post
    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"?
    Have you ever seen an advertisement for an "automated ATM machine"?

    The English language, especially the American variant, is screwy.
    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.*

  6. #6
    Math wizard
    Join Date
    Dec 2006
    Location
    USA
    Posts
    582
    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.

  7. #7
    Registered Abuser
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    591
    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:
    Quote Originally Posted by American Heritge Dictionary of the English Language 3rd Ed.
    a. A system of signals used to represent letters or numbers in transmitting messages.
    b. A system of symbols, letters, or words given certain arbitrary meanings, used for transmitting messages requiring secrecy or brevity.
    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".
    Last edited by @nthony; 05-09-2007 at 02:08 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Plan
    By Programmer_P in forum C++ Programming
    Replies: 0
    Last Post: 05-11-2009, 02:42 AM
  2. Client-server system with input from separate program
    By robot-ic in forum Networking/Device Communication
    Replies: 3
    Last Post: 01-16-2009, 03:30 PM
  3. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 08:54 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21