All synchronization depends on either the user, or a program, deciding which is the source and which is the destination. Such a choice is always made.
Consider this example:
1. Device A has a list of 9 contacts.
2. Device B has a list of 10 contacts.
3. According to your thesis, the sync program doesn't need to be told which is the source and which the target.
4. If so, and if the user intentionally deleted a contact from device A, shall the sync program:
x. Restore the contact missing from device A from device B, or
y. Delete the contact missing from device A from device B?
The answer is that the sync program cannot know what to do without being told which is the source and which is the destination.
This is how iTunes decides what to do -- the user tells it which is the source and which is the destination.
> According to your definition, this is not 'syncing'. But for most people, it is.
Yes, and to prove this point, and of the ascendancy of human instinct over logic, the OP lost his music collection.
This is a classic example of people's inability to think logically. How on earth could a computer program know what to do in the above example without being told what to do by the operator?
There's one exception, which ironically proves the point. In the example of real-time contact list synchronization, a sophisticated system would automatically assume that the device the operator is using at the moment, that he is editing, is the de facto source, and make other synchronized devices have the same content (this is how Google Contacts works). But in this example, as in all examples, the sync process cannot proceed until a decision is made about the meaning of "source" and "destination". In this example, the decision is automatic, but it has to be made.
In the case of syncing two music collections, the operator has to specifically identify which is the source and which the destination. I cannot tell you how often I've heard stories of people buying a new iPhone, then running iTunes, then erasing their music collection by misidentifying the source for the transaction.
4. If so, and if the user intentionally deleted a contact from device A, shall the sync program:
x. Restore the contact missing from device A from device B, or
y. Delete the contact missing from device A from device B?
Stop thinking in files and start thinking in actions, and the answer is obvious. The delete action is being synced, therefore the contact should be deleted from B. If the file is merely missing (e.g. due to filesystem corruption), it should be created from B, since you are syncing the create action.
There's no directionality needed or implied, it's a merge of two trees.
> The delete action is being synced, therefore the contact should be deleted from B.
Yes, and that is exactly what I said in my post, the one that got downvoted -- there are special cases where the context can be used to decide which is the source and which the destination. But a source and a destination must always be selected.
> There's no directionality needed or implied, it's a merge of two trees.
Not in the general case, because there is no general case. How do you merge two directory trees having different file sets without knowing the operator's wishes? Does he want files missing from one tree to be deleted from the other, or does he want files missing from one tree to be restored from the other? The answer is that you ask him -- the operation cannot proceed automatically.
And for this obvious, technically correct insight, my posts get downvoted with perfect reliability.
Yes, and that is exactly what I said in my post, the one that got downvoted -- there are special cases where the context can be used to decide which is the source and which the destination. But a source and a destination must always be selected.
There is no source nor destination, it's a merge of two equivalent trees. When I do "git merge <remote>", I'm not saying I want to replace the local branch with contents of the remote, nor vice versa. There's no source nor destination, they're both equal.
How do you merge two directory trees having different file sets without knowing the operator's wishes? Does he want files missing from one tree to be deleted from the other, or does he want files missing from one tree to be restored from the other?
You're still thinking in files. There are no files, just actions. The files are a byproduct, not the things being synced.
> There is no source nor destination, it's a merge of two equivalent trees.
Let's say I have two systems in a programming project. On one of the systems, I have edited some files, but now realize I have created a bug I can't locate and I don't want to try to undo what I have done -- I just want system B to be returned to its original state, a state represented by system A, but with a minimum of file operations.
So I run a synchronization operation, and I tell the algorithm how to proceed. If I follow your philosophy --
"You're still thinking in files. There are no files, just actions. The files are a byproduct, not the things being synced."
-- then (using the default rules of two-way file synchronization), the edited files, the files I have ruined, files having newer dates than the originals, will be copied onto the original source tree, tree A, and I will lose the only remaining copies of the files' original states. If instead I delete the edited copies to avoid this, the originals will be deleted too.
So much for automatic file synchronization without the operator understanding and overseeing the process.
Your reply doesn't analyze file synchronization operations with enough depth to avoid such disasters.
You've moved your argument from "synchronization always must have a source and destination" to "certain synchronization models are not well suited to some use cases".
I certainly agree with the latter, even if it has no bearing on the former.
> You've moved your argument from "synchronization always must have a source and destination" to "certain synchronization models are not well suited to some use cases".
No, I have moved from specific examples to general examples, and general rules. The most general rule is that synchronization cannot be automatic and have a desirable outcome.
If it happens that often then iTunes isn't communicating clearly enough to the user what is about to happen. I'm reminded of this advice:
> The principle is simple: it's not your fault. (Side note: if you don't understand this reference, then do yourself a favor and watch this video[1].)
It's not your fault. It's not the user's fault. It's not the designer's fault. In fact, it's nobody's fault. What's crystal clear to you might be confusing to me, and no one is to blame for that. It's just something we have to work with. — Source: http://moz.com/blog/5-lessons-learned-from-100000-usability-...
> If it happens that often then iTunes isn't communicating clearly enough to the user what is about to happen.
Yes, I agree completely. But given that, I have to say I hear regularly from people who (a) buy a new iPhone, and then (b) wipe their music collections later on the same day.
Many people assume that an apparently sophisticated, polished program like ITunes will "do the right thing." But no.
Consider this example:
1. Device A has a list of 9 contacts.
2. Device B has a list of 10 contacts.
3. According to your thesis, the sync program doesn't need to be told which is the source and which the target.
4. If so, and if the user intentionally deleted a contact from device A, shall the sync program:
x. Restore the contact missing from device A from device B, or
y. Delete the contact missing from device A from device B?
The answer is that the sync program cannot know what to do without being told which is the source and which is the destination.
This is how iTunes decides what to do -- the user tells it which is the source and which is the destination.
> According to your definition, this is not 'syncing'. But for most people, it is.
Yes, and to prove this point, and of the ascendancy of human instinct over logic, the OP lost his music collection.
This is a classic example of people's inability to think logically. How on earth could a computer program know what to do in the above example without being told what to do by the operator?
There's one exception, which ironically proves the point. In the example of real-time contact list synchronization, a sophisticated system would automatically assume that the device the operator is using at the moment, that he is editing, is the de facto source, and make other synchronized devices have the same content (this is how Google Contacts works). But in this example, as in all examples, the sync process cannot proceed until a decision is made about the meaning of "source" and "destination". In this example, the decision is automatic, but it has to be made.
In the case of syncing two music collections, the operator has to specifically identify which is the source and which the destination. I cannot tell you how often I've heard stories of people buying a new iPhone, then running iTunes, then erasing their music collection by misidentifying the source for the transaction.