4

There are currently two major interpretations that I have learned:

  • As in "source vs. destination" sense, in contrast to object/machine code
  • As in "original", e.g. the compiled program is originally written in the C programming language.

Which of it is actually used in the early days?

5
  • 1
    I'm pretty sure it's the "vs destination" sense. The metaphor is that the source file travels through the compiler to a destination file containing the machine code.
    – Barmar
    Commented Aug 7 at 6:16
  • 11
    Both your meanings are essentially the same. It starts as source code and is converted to the destination.
    – Stuart F
    Commented Aug 7 at 7:12
  • To see that @StuartF is right (they are essentially the same), it may help to consider that the (etymological) source of source is French from Latin meaning a place where water surges from the ground. It’s like the synonym spring, which captures the same image: water springing up from the ground. Commented Aug 7 at 11:20
  • 1
    Figure 1 of Claud Shannon's 1948 paper "A Mathematical Theory of Communication" shows a block diagram of a communications model starting at "source" and ending at "destination". people.math.harvard.edu/~ctm/home/text/others/shannon/entropy/…
    – Phil Sweet
    Commented Aug 7 at 13:49
  • @PhilSweet Yep, and then there's the channel over which the message goes. Others took this and made it Sender,Message, Over the Channel and Recipient.
    – Lambie
    Commented Aug 7 at 15:37

1 Answer 1

7

Short answer: origin.


For usage "in the early days", it helps to know how the term was coined.

The OED cites a 1965 Communications [of the] ACM article as the first use of the term "source code".

Derek Jones, on The Shape of Code, references that OED entry and helpfully quotes C.ACM: "The PUFFT source language listing provides a cross-reference between the source code and the object code".

Derek also cites an earlier 1959 Proceedings of the EASTERN JOINT COMPUTER CONFERENCE: "The compiler uses this convention to aid in distinguishing between SIMCOM statements and SCAT instructions which may be included in the source code."

In the early days of computing, programming referred to the direct crafting of what we now call object code. Wikipedia's History of Programming Languages lists John Mauchly's Short Code of 1949 as the "one of the first high-level languages ever developed for an electronic computer". Although 1965 was about one and a half decades on from 1949, object code must have still loomed large when thinking about programming since even in the 1980s, people were still hand-crafting assembly code, which is very close to machine language / object code.

So with the object code as the primary reference, it makes sense to call the high-level language code its source. Today, the high-level code has become the primary reference, and it's common to replace the modifier source with the language name for newer languages (e.g. Java code). For older languages, you might see references to C source instead. The generic code tends to refer to the high-level language or source code these days.

This history leads me to conclude that the term source in source code carries the sense of origin - the origin of the object code.

The source/destination sense isn't all that far away from the origin sense, but source/destination would likely have implied having the source as the primary focus or both source and destination equally in view. I doubt that was the case in the early days.

5
  • Might want to draw a line back to Shannon's source coding theorem of 1948. people.math.harvard.edu/~ctm/home/text/others/shannon/entropy/…
    – Phil Sweet
    Commented Aug 7 at 13:38
  • 3
    @PhilSweet I'm not sure how relevant that is, since it's talking about communication, where there's a sender at the source and a receiver at the destination. This is not really the same sense as source code in programming.
    – Barmar
    Commented Aug 7 at 14:43
  • But the question was about the origin, not the current situation. By '69 if not earlier, Source programs used memory labels; and compilers converted them to object programs with absolute memory references. But the ideas and terms existed back in the days of telegraphy and programmable mechanical machines. The source code pertained to intellectual property. It was what you protected and archived. It was the target of configuration control. These issues still apply today and they had a lot to do with the evolution of modern computer architecture. The term source code is technology agnostic.
    – Phil Sweet
    Commented Aug 7 at 17:48
  • 1
    It might not have etymological bearing, but I feel like "source" is common today when distinguishing between the code and a user-facing interface compiled from it; e.g. most web browsers include a command "view page source." Commented Aug 7 at 17:48
  • What I really wanted to say is that the source in source code was tech agnostic.
    – Phil Sweet
    Commented Aug 7 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.