In RulesAreMadeToBeBroken, RaySchneider says: "It all reminds me of the moral decision making principles taught by the good Jesuits ... ThePrincipleOfDoubleEffect is one of the most interesting and most misunderstood."
Can someone explain the rule?
I'm a Dominican, not a Jesuit, but as I understand it the principle states that, If an act has both good and bad (foreseeable) consequences, it is permissible when the following hold: 1) the act is not itself bad; 2) the bad consequence is not intended; 3) the bad consequence is not the means of achieving the good consequence; and 4) the good consequence sufficiently outweighs the bad consequence.
Consider, for example, the question of whether I should hard-code an array size. This might have the good consequence of simplifying my code, or maybe making it a little faster; a bad consequence is the maintenance cost.