<< April 2012 | Home | June 2012 >>

Light reading received

Just received my review copy of the new XPages book on the extensibility library (XPages Extension Library: A Step-by-Step Guide to the Next Generation of XPages Components). Should be an interesting read - it involves plugins :)

IBM moving to electronic support only

Starting June 2012 customers are "requested" to start opening IBM Serbice Requests (SR) using the electronic support portal and from 2013 only electronic entry will be possible for severity 2, 3 and 4. This is in no way a surprise and makes IBM move funds from the probably costly phone based support they are offering now and probably also makes a lot more sense for supplying all the relevant information. This is all well and good so long the quality of the data entry forms are top notch. More information can be found at the announcement.

Tags : ,

Joda Time comment

Ulrich Krause has an interesting post (Joda to the rescue) and I just had to comment on as I - probably to no surprise to many - work a lot with dates for the OnTime Suite. Ulrich is using the Joda Time library to compare two dates to see if they are on the same day by first stripping the time component which isn't easily possible using java.util.Date. My comment is to remember that the Java Date object is just a wrapper about a UTC long so math can do the trick. Below is my comment.

While Joda Time is a great library there is an easier way to accomplish what you are trying to do. Simply remove the time component by doing a simple modulus calculation. I am not trying to be smart about it but we do this quite a lot at OnTime :) Code could look like so:

Date d = new Date();
long lngTime = d.getTime();
lngTime -= lngTime % TimeUnit.DAYS.toMillis(1);
Date dNoTime = new Date(lngTime);
The latter date object creation isn't actually necessary for the comparison. An utility function could be like so:
private boolean isSameDay(Date d1, Date d2) {
  long lngTime1 = d1.getTime();
  lngTime1 -= lngTime1 % TimeUnit.DAYS.toMillis(1);

  long lngTime2 = d2.getTime();
  lngTime2 -= lngTime2 % TimeUnit.DAYS.toMillis(1);

  return lngTime1 == lngTime2;
Hope it helps and it helps remove the dependency on Joda Time if that's all you're using it for.

Tags :

Day in the Life presentation with Chris Crummey

Chris is an excellent presenter and I had the pleasure of seeing him present again at the keynote at BLUG. The video runs 12 minutes and it's an excellent overview of the IBM collaboration solutions.