Wednesday, November 21, 2007

Oracle surprise

I was hunting an issue where inserting an empty string (not null in Java, but with String.lenght()==0) resulted in a constraint violation exception. The column was a varchar2 one and indeed marked as not null.

I asked some people that should know (including a former DBA) and everyone told me that "" != null - always.

Digging around I found the following in an Oracle manual:

Note: Oracle Database currently treats a character value with a length of zero as null. However, this may not continue to be true in future releases, and Oracle recommends that you do not treat empty strings the same as nulls.


So in this case "" == null.

It is ok if one knows it and one can work around, but it came as surprise to me and others.

Tuesday, November 20, 2007

Broken ixus

About one and a half years ago I bought myself a Canon Digital Ixus i Zoom. After two weks, the camera was broken, as the lens protection lids were just lying in the lens tube. I had the camera sent to Canon and they repaired it on warranty.
The camera worked well - until recently when I had the same issue again. Googling around indicated that this time the repair would be expensive.



After the camera was just lying around, I thougt "why don't I just remove the broken parts and try if it works again?"

Here is what worked for me.
I take no responsability whatsoever if your camera breaks, you hurt yourself or your dog runs away.
Continue reading at your own risk


So I took tweezers to try to remove them. As this was not soo easy I shaked the lens tube a bit and found out that I could just remove the cover.

The next image shows the parts that fell out


This closeup of the front shows an axis (red), a slider (green) and a hole (blue)


Put the one cover thingy with the hole marked in red on the axis and the hole marked in green on the slidrer. The teeth must be facing the hole marked in blue. Then put the other thingy in place with its little axis in the hole marked in blue and the teeth mathing those of the other one.


The result should look like in the next picture:



Or when you switch the camera on:


Now it is time to clip the grey plastic ring back on. There is basically only one way to do it right:



After that put the metal tube/front cover back on it and carefully apply some preasure to it. Volia the result:

Wednesday, November 14, 2007

Hyperic and Red Hat cooperate

Red Hat / JBoss built the JBoss ON 1.x product on the base of code from Hyperic. Now the two companies
are going to collaborate on that.

Why do I write that? Because I am part of the JBossON team :)