Saturday, January 26, 2008

Ron Paul

To anyone who cares I am supporting Ron Paul for president.

Saturday, January 19, 2008

Why Socialistic Governments Will Always Fail

Government imposed socialism and socialistic policies have many supporters in the Unites States. Popular politicians from both parties have taken positions that interfere in the private sector and are moving the country in the wrong direction. In this article I assert that such government practices shall ultimately fail because they are incompatible with human free will. I define failure as a range of unintended outcomes from not achieving stated goals to total self destruction.

Healthy human beings exist with both a free will and a value for their own life. Many may choose to adhere to socialistic principals such as committing resources to a religious community, donating to charity, or volunteering time for the betterment of society. In this context, socialistic principles are a virtue - a means by which a person may achieve their own values.

Government imposed socialism is not a moral equivalent. By definition, any government that imposes a system of values on a population is oppressive to those who reject those values. Socialism is the moral equivalent to a theocracy. The only true distinction is whose values are being forced upon you. To advocate the principles of Marxism and at the same time reject a Catholic government taking orders from Rome is a contradiction. Inevitably such governments must enforce their values on dissenters, typically at the cost of human lives - as history has shown.

The source of this value-oriented conflict is human free will. While any governmental implementation of authoritarianism can force a population into compliance, it cannot change the fact that every individual independently chooses what he or she values. Further, only a government that values freedom and life can sustain success. Laissez-faire capitalism is the only form of government ever to exist that is compatible with both human free will and an individual’s value of his or her own life.

Tuesday, January 8, 2008

Configure JVM DNS Caching

I solved a minor but irritating JVM problem where host names are cached in forever. While this makes DNS spoofing attacks much more difficult, it is also forces an application restart for host name changes to be recognized.

The solution is to alter the networkaddress.cache.ttl settings in $JAVA_HOME/lib/security/java.security file. By default this property is a -1 which caches forever. By setting to a positive integer the JVM will cache host names for that number of seconds.

Sunday, January 6, 2008

OS X: Integrate GPG Into Finder Using Automator

As a developer, I often find myself downloading open source software packages and libraries for my projects. Best practices dictate that you should always verify signed packages if a signature is present. Normally I do this from the command line but I recently created an Automator workflow that lets me check signatures right in the OS X Finder application. The rest of this article is a tutorial on how I implemented this workflow.

Getting started, you will need to have GNU Privacy Guard installed on your system. You can easily install gpg via Darwinports. I will be using gpg version 1.4.6 on Mac OS 10.4.11 (Tiger) for this tutorial.

The first thing to do is to get a signature that needs to be verified. For this example I will download the Jakarta commons-codec package. When downloading, be sure you also get the PGP KEYS file and the commons-codec-1.3.tar.gz.asc signature file.

Once you have downloaded the three files you will need to import the data in the KEYS file into your gpg keyring. Note that this will only need to be done once:

gpg --import KEYS

After the import, right click on the commons-codec-1.3.tar.gz.asc file and select Automator -> Create Workflow. Once the workflow editor opens, add the following three steps:

  1. Get Selected Finder Items - Finder Application
  2. Run Shell Script - Automator Application
  3. Run AppleScript - Automator Appliction


Step 2 will actually run the gpg signature verification command. Note that /opt/local/bin is the default location where Darwinports installs the gpg application:

/opt/local/bin/gpg --no-tty --verify $1 2>&1 || exit 0


Now in step 3, a short AppleScript will be used to display the signature verification results:

on run {input, parameters}

display dialog item 2 of input buttons {"OK"} default button 1

return input
end run

Finally, save your new workflow as a plugin for the Finder application. Go to File -> Save As Plugin and choose Finder. Save the workflow as "Verify Signature". Now you will be able to choose the Verify Signature workflow from the Automator menu in Finder.