Apple’s glossy displays

Posted by Martin Homik | Posted in Uncategorized | Posted on 29-10-2008

0

I considered to get a Mac this year. I was waiting for the new MacBook Pro models to be up to date. But Apple ships their producs with glossy displays only. Software developers all over the world discuss this issue and in general they agree that working with a glossy display 8-10 hours a day is a no-go.Now, developers have no choice, and this is a critical point.

Yesterday, I asked a collegue to put his notebook with a glossy display on my desk. My suspicion was correct. I was able to see myself, the lights, the room behind me and the window. I wasn’t able to see the whole display at once. I had to turn my head in order to see some parts of the display. I fear that with a glossy display, my eyes will ache after 4 hours.

In conclusion, I am very disappointed. I won’t buy a Mac with a glossy display. I keep my old Thinkpad which is slow, but at least a pleasure to work with.

Overloading methods and passing ‘null’ as argument

Posted by Martin Homik | Posted in Java | Posted on 28-10-2008

2

Today, I came across a NPE which pointed me to a problem which I cannot resolve. Assuming, you have two overloaded methods in a class:

  1. public void setProperty(Collection c);
  2. public void setProperty(String c);

Which method will be invoked when the parameter is null?

Answer: you cannot call setProperty with a null parameter. The compiler will complain. In all other cases the signature of the method is matched. So, it doesn’t matter if your String has the null value, it only matters that you apply a method applied to a String parameter. This is the signature. This is matched.