Ethics is a slippery subject. Different people have different ethical stances, so if I were to say &quot;that&#x27;s unethical&quot; to you, you&#x27;d be likely to misunderstand me.<p>One common ethical stance is utilitarianism. This stance purports to optimize collective welfare. I don&#x27;t know any NSA people, but it seems likely that they share a utilitarian approach to ethical decision making, and they define happiness as security from evildoers. (I&#x27;m speculating about their stance, not claiming it to be my stance.) Selfish interest is part of utilitarianism.<p>For example, if you have a utilitarian stance you might choose to refrain from having sex with strangers to protect your health and theirs.<p>Another ethical stance is deontology. In this stance you refrain from having sex with strangers because it&#x27;s externally defined as wrong. For example, &quot;Do not commit adultery&quot; shows up in one common collection of externally defined rules. If you say to someone, &quot;that&#x27;s illegal&quot; you&#x27;re speaking from a deontological stance.<p>A third stance is altruism. When operating in that stance, people value the welfare of others above their own welfare. Many who donate blood do so from an altruistic stance.<p>Real people have a combination of actual stances. And for most of us, our real, operative stances are often not quite aligned with what we say our stances are. That&#x27;s just reality. Almost nobody completely walks their talk on this stuff.<p>An engineer who works through the night to repair a critical defect probably has a combination of ethical attitudes. Trying to make users happy is altruism. It may also be deontological -- they&#x27;re violating their quality agreements. It may also be selfish and utilitarian: losing face, losing revenue and getting fired are to be avoided. All that is fine.<p>Life is harder when different people have contradictory stances. The life and death of Aaron Swartz is a tragic example of that.<p>Immanuel Kant proposed the &quot;categorical imperative&quot;. (Oversimplifying) he suggests that we should live and behave ourselves the way we WISH everybody would live and behave. Professional codes of ethics attempt to employ the idea of the categorical imperative to create a shared ethical stance.<p>Codes of ethics are helpful precisely because of the slipperiness of ethics. Good codes of ethics offer a common language. And they serve to convert various ethical stances into deontological stances--written external collections of rules to follow. They make it easier for us to predict each others&#x27; ethical behavior.<p>So, a plea: when questions of ethics are up for grabs, let&#x27;s be explicit about our own ethical stances and generous when trying to interpret other peoples&#x27; stances.