Morality and hypocrisy in Java
April 11, 2008
Disclaimer: Opinions expressed in this blog in general and this post in particular are my own, and may not reflect the opinions of my employer(s), ISP(s), friends, family, pets (if any), romantic partners (if any), etc.

Today I’m going to dwell on something other than programming, though like a well-trained homing pidgeon, I’ll quickly find my way back. Lots of talk about China and Tibet these days - the spotlight on Tibet seems brighter than any time in recent history. It is easy and oh-so-tempting to decry a forced occupation, to swell up in anger over alleged destruction of an ancient heritage… But what is right and wrong?
I believe principles and morals should be firm - they shouldn’t change from one context to the next. Of course they need to be complex enough to reflect and accomodate various nuances in situations, but the methods by which we label something right or wrong should be invariant. In other words, we should be able to represent morality as a function in say, Java (not Ruby where a function could be one thing today and another thing tomorrow). It would look something like this:
public static bool isMoral(Circumstance[ ] something);
The obvious choice would be something along the lines of “forced occupation of an unwilling people is immoral”. Ok, let’s put it through some test cases. Occupation of Tibet? Looks like a no-no. A hypothetical invasion of Taiwan? Ditto. How about the forced retention of the Confederate states in the U.S. Civil War? Most Americans consider the Civil War one of our nation’s brightest moments - we’d expect a true here. After all, the Confederates had slavery! Ok, so do we change our function to be “forced occupation of an unwilling people is immoral unless they’re engaged in a highly-immoral practice”? Well, for starters we now have a recursive call to the isMoral function…
Perhaps some base case can be defined, broken down into finite weighted critera - and yours will probably oh-so-slightly from mine… but that’s not my point. I would suggest that we all take a test-driven approach. Before accepting any morality-based assertion, try to apply the same morality function to every other case, past or present, real or hypothetical, that you can think of.
We agree the colonization of North America at the expense of the native peoples was immoral and we’ve made some ammends, but we didn’t leave, did we? So perhaps aside from the isMoral function, there’s also an isAcceptable function. And this one could benefit from some TDD too… from historical test cases, it seems that it is not acceptable to attend the 1980 olympics in Moscow over the Soviet invasion of Afghanistan to fight the Taliban and Osama bin Laden, but it is acceptable to attend the 1936 olympics in Berlin, in Nazi Germany… Clearly to enough people both seemed acceptable at the time. Unlike morality, acceptability seems more like a Ruby function than a Java one - this today, that tomorrow.
So if we consider the present-day outcome of the North-American colonization acceptable, regardless of morality, the Tibet occupation might have an acceptable outcome too. Perhaps, the global attention and a strong desire for resolution could allow for an agreement that includes both occupation and socio-cultural preservation. Many people’s isMoral functions would balk, but perhaps the majority of the world’s isAcceptable functions could eventually return true.
Entry Filed under: Uncategorized. .

Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed