" /> UrlBlogGrey: October 2005 Archives

« September 2005 | Main | November 2005 »

October 28, 2005

I Want My Mac Mini

Yesterday, I ordered a Mac Mini on Amazon. I absolutely can't wait for it to arrive! For a while, I've wanted to upgrade the OS on my Powerbook from 10.3 (Panther) to 10.4 (Tiger) which the Mini will include. The RSS feature in Tiger's Safari web browser has got me super excited, along with support for Java 1.5. Also, I need some extra hard-drive space for my ever-growing digital music collection. The Mini will give me a chance to use the 19" LCD monitor that's been collecting dust for the last year since I moved in with Natalie and mothballed my PC. I'm really hoping that I get one of the unadvertised upgrades rumoured to be in circulation. Yay!

The Art & Science of Grinding Coffee

I love coffee. I've been amazed by the variability in taste since I began buying coffee beans rather than pre-ground coffee. It's incredible how something as simple as the type of grinder used can make-or-break a cup of joe. But that's exactly what I discovered recently when Natalie bought me a Capresso conical burr grinder for my birthday.

It's widely known that blade grinders produce an uneven grind. Some beans get ground more finely than others since they incur more contact with the blades. It's a very unpredictable exercise. But burr grinders operate on one bean at a time, grinding each with precisely the same fineness. The grinder also has a large effect on the oil content of the grounds, which ultimately affects the flavor of the coffee. With a blade grinder, a lot of the bean's oils are expended as heat due to excessive contact with the blades. But with burr grinders, more of the oils are retained in the grounds because the beans make minimal contact with the burrs.

So, with my new grinder I have been able to experience a much richer, complex cup of coffee from my trusty drip machine. I can't wait to experiment with espresso! Unfortanately, the kitchen in our apartment is too small to support keeping the espresso machine on the counter permananently.

October 18, 2005

Renewing IP Address for a Broadband Connection

For the last four months, I've been subscribed to Comcast Broadband Internet at home. Service has been very good, but occasionally my connection is extremely slow without a discernable pattern. This afternoon, I heard on a Security Now! podcast that frequently users of file-sharing programs will routinely have their IP addresses re-assigned to new users, and those new users with the old IP address become subjected to large volumes of file-sharing requests intended for the original user of the IP address. This could result in severely degraded network performance for the new user for no apparent reason.

This reminded me of a security tip I've seen for operators of home Wi-Fi networks which is to consider connecting your wireless access point (AP) to a power outlet timer. These are the timers that people often use when on vacation to activate their home's lights at predetermined times. Similarly, a timer can be used to shutdown an AP during times outside the normal usage windows (i.e. 1AM - 6AM). This is in line with the old security tenet that the only safe computer (or network) is the one that's turned off. Shutting down a computer network during off-hours will reduce its exposure to snoops, and provide your Internet access provider to assign your AP a new IP address. Using the same IP address over a prolonger period increases the likelihood of attack since your traffic is coming from a semi-permanent source. I'm going to experiment with this in the near future and will post my results on this blog.

October 15, 2005

"Crypto" Book

A couple of days ago, I started reading the book "Crypto" by Steven Levy. Natalie has owned the book for several years, so it was a spontaneous decision on my part to pick the book up and begin reading. I read Levy's book "Hackers" in 1996, and it had a profound effect on my understanding of computing history and culture. "Crypto" seems to be written in a similar fashion as "Hackers". So far, it has covered the history of modern public key cryptography through the eyes of its creators: Diffie, Helman, etc. I love reading narratives, particularly when they involve computing :)

0140244328L

October 10, 2005

Creating 'Calendar' Instances with Betwixt

At work, I'm currently developing a prototype for mapping between legacy and modern messaging data structures. The modern data structures are actually JAX-RPC Web Service stubs generated from a Web Services Description Language (WSDL) document. The JAX-RPC reference implementation generates attributes of type java.util.Calendar to represent XML Schema 'datetime' elements. This is fine, exception that Calendar is not a valid Java Bean since it lacks a public default constructor.

This is normally not a problem, since a new instance of Calendar can be had by invoking 'Calendar.getInstance()'. However, I'm using Betwixt to load an XML document into the JAX-RPC stubs, and Betwixt assumes that the data structures are all Java Beans with default constructors. Betwixt chokes onces it tries to create a new instance of Calendar to hold date/time information.

So, I sought out a solution to configure Betwixt to construct Calendar appropriately. It turns out that Betwixt is lacking in documentation, or at least, well-organized documentation. I eventually figured out a good way to address the problem.

Create a class (i.e. CalendarCreator):

public class CalendarCreator implements ChainedBeanCreator

  public CalendarCreator() { }

  public Object create(ElementMapping mapping, ReadContext context, BeanCreationChain chain)
  {
    if (Calendar.class.equals(mapping.getType()))
    {
      return Calendar.getInstance();
    }

    return chain.create(mapping, context);
  }

}

Then, associate the CalendarCreator with the Creator Chain used by the BeanReader when reading your XML document:

BeanReader beanReader = new BeanReader();
beanReader.getXMLIntrospector().getConfiguration().setUseBeanInfoSearchPath(true);

// add Calendar creator to chain
BeanCreationList chain = BeanCreationList.createStandardChain();
chain.insertBeanCreator(1, new CalendarCreator());
beanReader.getReadConfiguration().setBeanCreationChain(chain);

This will result in the CalendarCreator instance being consulted regarding attributes of type Calendar. I'm sure that this approach can be applied to any class that needs to be constructed in a manner other than just with the default constructor.

October 5, 2005

Podcasting

I have been hearing the term "podcast" for several months; but, until recently, I didn't understand the real benefits of having an audio subscription. The latest version of Apple iTunes includes the ability to subscribe to audio programs in the same way that web browsers like Firefox allow users to subscribe to RSS feeds from Blogs. What's cool is that iTunes will automatically download and manage podcasts on your system, and even include them when synchronizing with an Apple iPod.

So, instead of fetching the latest copy of the newspaper from your front porch, you could just pick up your laptop or portable music player with up-to-the-minute audio programs provided via a podcast subscription.

Also, the subscription exists only within the scope of your podcast application; in no way does the provider of the audio content oversee the subscription. This is a great example of software applicaitons taking care of the boring repetitive tasks like checking for updated content.