Take the 2-minute tour ×
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

I am thinking specifically of comparing two files using diff in linux or git (for those of you familiar with it), but this relates, I think, to any comparison.

I have two files. File 1 and File 2. File 1 is the older, original file - the one that is the base of comparison. File 2 is the 'draft' file - the one that will be compared against File 1 to assert differences, in this case additions or reductions in lines of text.

I want to compare them - how can I refer to each file?

My ideas:

File 1: comparer, original, base, original, current, active
File 2: comparee, draft, new

Is there an agreed upon naming convention for this scenario?

share|improve this question
1  
foo and bar? –  Bakabaka Aug 6 at 9:28
    
i want something desciptive about the role that these files are playing. foo and bar are good placeholders when the role is undefined or unimportant, but that's not the case here –  dax Aug 6 at 9:29
    
removes tongue from cheek –  Bakabaka Aug 6 at 9:31
    
hangs head i see. –  dax Aug 6 at 9:32

3 Answers 3

up vote 4 down vote accepted

Just about every diff (comparison) system I've used has labelled these source and target respectively.

Note that this convention does privilege the file named first -- the source -- as the canonical, "normative", reference. For example, if file1 has a line file2 lacks, then tools following this convention will say the line has been deleted (to produce the target) rather than added (because a source isn't produced).

For the sake of having a reference, the Wikipedia article on data differencing uses the terms this way, which means they will probably be clear enough to your audience without a lot of introduction.


By the way, for a little bit of fun, the two files, collectively, can be called the "comparands" (viz "operands", "summands", etc).

share|improve this answer

This seems to be one of these circumstances where you have answered your own question.

I have two files. File 1 and File 2. File 1 is the older, original file - the one that is the base of comparison. File 2 is the 'draft' file - the one that will be compared against File 1 to assert differences, in this case additions or reductions in lines of text.

Original

a primary form or type from which varieties are derived.

Draft

a preliminary form of any writing, subject to revision, copying, etc.

The words you have suggested are already clear enough not to cause confusion.

share|improve this answer
1  
yeah, base came to me when i was writing it, and that seemed like the best until Dan's answer –  dax Aug 6 at 11:11

According to the majority of definitions of the diff command, the technical terms for the two files are the from_file and the to_file.

The important thing to note here is that the command makes no underlying assumption of relationship between the two files- so original and draft or old and new arent correct in the context of the command, but may be correct in the context of your application of it.

In the simplest case, diff compares the contents of the two files from-file and to-file.

source:about.com, unixhelp.ed.ac.uk

Indeed, simply using FileA and FileB, or File1 and File2 (etc) could suffice, unless you wish to imply an implicit relationship.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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