C Board  

Go Back   C Board > Community Boards > General Discussions

Reply
 
LinkBack Thread Tools Display Modes
Old 05-08-2007, 10:41 PM   #1
Math wizard
 
Join Date: Dec 2006
Location: Minot, ND, USA
Posts: 521
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"?
ulillillia is offline   Reply With Quote
Old 05-08-2007, 11:00 PM   #2
Registered Abuser
 
Join Date: Jun 2006
Location: Toronto
Posts: 579
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.
@nthony is offline   Reply With Quote
Old 05-08-2007, 11:36 PM   #3
Math wizard
 
Join Date: Dec 2006
Location: Minot, ND, USA
Posts: 521
My question is why is it called "code"?
ulillillia is offline   Reply With Quote
Old 05-08-2007, 11:50 PM   #4
Ethernal Noob
 
Join Date: Nov 2001
Posts: 1,891
Looking at the formal definition of code, it makes sense.

Quote:
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.
indigo0086 is offline   Reply With Quote
Old 05-08-2007, 11:57 PM   #5
Just Lurking
 
Dave_Sinkula's Avatar
 
Join Date: Oct 2002
Posts: 5,005
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.*
Dave_Sinkula is offline   Reply With Quote
Old 05-09-2007, 12:05 AM   #6
Math wizard
 
Join Date: Dec 2006
Location: Minot, ND, USA
Posts: 521
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.
ulillillia is offline   Reply With Quote
Old 05-09-2007, 01:06 AM   #7
Registered Abuser
 
Join Date: Jun 2006
Location: Toronto
Posts: 579
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 01:08 AM.
@nthony is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Program Plan Programmer_P C++ Programming 0 05-11-2009 01:42 AM
Client-server system with input from separate program robot-ic Networking/Device Communication 3 01-16-2009 03:30 PM
To find the memory leaks without using any tools asadullah C Programming 2 05-12-2008 07:54 AM


All times are GMT -6. The time now is 06:05 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

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