f(oath)-->Binding
Such that f(privacyOath)-->privacyOathBinding
And f(loyaltyOath)-->loyaltyOathBinding
Maybe I am just not sold on the whole oath thing. Doctors are regulated not by oaths but through licensure. Licensing of computer programmers is a possible future state of affairs with more likelihood than might currently be obvious without looking at historical precedent - e.g. local governments often license all businesses, other professions become licensed as they mature, and as PRISM shows, governments have an interest in the products of programming. The future may inherit more from North Korea than we wish to consider.I don't think "programmer" is a well-defined enough concept to be associated with an oath. You can't go around calling yourself a Medical Doctor or an Engineer if you aren't, but pretty much anybody who codes at all can reasonably call themselves a programmer.
Even with all that aside, such oaths only really work for things like causing blatant harm. Unqualified "freedom" and "liberty" (especially in the USA) are so nebulous they mean almost nothing at all. The overwhelming majority of programmers work for organisations whose goals (e.g. profit, power) are not - and are often directly opposed to - "freedom" by any reasonable definition.
In short, I don't think the answer to your question is "no, there shouldn't" so much as "no, there couldn't".
An analog to the Hippocratic oath (an oath which is not taken generally in any consistent form [1], which has no binding force, and the form of which that is administered is generally maintained and decided on by individual educational institutions rather than the practicing community), probably not useful.
[1] http://en.wikipedia.org/wiki/Hippocratic_Oath#Modern_use_and...
Everybody will find justification for their actions as unethical as they may seem to you.
Obviously, there are problems with this. But the point that Martin makes is a really good one. Technology is going to dictate a vast majority of our lives going forward, and programmers are the ones that literally make that technology. A lot like a surgeon operating on a person, a programmer can be neglectful or overly intrusive.
I think an oath is a great idea, actually.