Producing W3C Datetime Format with Timezone in Java

W3C Datetime (also known as ISO 8601) is a standard machine readable way of formatting dates. In its most specific form, dates can be printed with time and time zone in this format:


For example:


It is not as easy to produce dates in this format in Java as it should be. I needed to format dates like this for creating an XML Sitemap file.


Graphing the performance of sub-domains in Google Analytics

My currency conversion website has a subdomain for each language.  It supports over 40 languages.  The entire domain is tracked in a single Google Analytics account.    I wanted to know which subdomains were performing best and which were performing worst, and how that was changing over time. (more…)

USB sound in Ubuntu – automatically selecting a USB audio device when it is plugged in

Ubuntu has started to support USB audio.    When I plug in a USB speaker or headset, it gets recognized and installed automatically.  However there are some bugs:

  • The USB sound device does not get selected automatically.   This is especially annoying for headphones.  When you plug in analog headphones, the sound automatically switches to them and the main speakers turn off.
  • The volume settings are turned way up for the device.  Ideally it would remember the volume settings from the last time the device was plugged in.
  • When the computer goes to sleep, the volume of usb devices gets turned way up on wake.

I discovered that I could address these shortcomings by creating a script.


Installing a CUPS printer via the command line under Ubuntu

I try to script everything I can on Linux.  When I install something on my desktop, I like to be able to run a script to install the same thing on my laptop.  When a computer breaks, I like to be able to run all the scripts to have it set up again just the way that it was. Here is how I scripted the installation of my printer.


Microwaved Chicken and Artichoke Casserole Recipe

This recipe is

  1. Healthy
  2. Very fast
  3. Tasty
  4. One dish

It is based on a dish that I have ordered in restaurants in New Hampshire.   I’ve adapted it for ease of preparation and left out any cream sauce for use with the South Beach diet.


Resetting Wireless Networking on Ubuntu without Rebooting

The wireless network on my laptop has always been unreliable.  When I open the lid of the laptop and the computer wakes up from sleep, there is a 10% chance that the wireless network won’t be able to connect.   In the past, the only thing that works in this situation is a full reboot of the laptop.