Archive for February of 2007

My podcasts

February 24, 2007
I have been subscribing some podcasts for some time. The idea of a podcast is nothing new anymore but finding good ones takes some time. So, here is my current list:

Some YLE (Finnish national broadcasting company) radio programs like A-Plus. These are usually well made as they are also broadcasted over national radio channels. And naturally it is good to hear Finnish.

BusinessWeek has also interesting program about their each weekly cover story. Quality is good and the content is also well done. However, sometimes the story is very strongly based on US economy and therefore it does not give me much.

Naturally I have some Apple related podcasts on my subscription list. Finnish Snadicast covers Macintosh and Apple news. In this show there are usually one or more visiting guests. The other one is much more technical podcast as it is about Cocoa programming. Late Night Cocoa covers various parts of Cocoa programming environment and despite complex topics it is rather easy to listen.

Gates vs. Jobs

February 15, 2007





Or direct link to
YouTube

Time and date handling tips for Java programmer

February 02, 2007
I have been working and suffering with complex business logic which basically handling dates based on various rules. As those rules come from law they should be implemented 1:1. Unfortunately law does not tell how to implement database schema and business logic for it. Here are couple tips:

  • Decide whether starting and ending times are needed to be inclusive or exclusive as soon as possible.
  • What is the needed resolution for date/time? Day, milliseconds or nanoseconds?
  • java.sql.Timestamp and java.util.Date are not the best friends - just check compareTo method on both. Sorting a List filled with a mix of those cannot be sorted with java.util.Collection.sort(List mixedList) as it fails with ClassCastException.
  • Joda-Time might be worth a look.
  • Write good amount of unit test cases, time and date handling is prone to errors. Running a test case is much faster than redeploying and clicking around.