Friday, August 22, 2008

I don't know

The "I don't know" imply here is not for avoid responsibility but to put down our ego and really mean it. Saying "I don't know" is excellent if it pair with:
  1. I'll find out more and get back to you later.
  2. I'll google it for you now and let us see.
  3. I'll write a test script now. Let us test and see what are the result
  4. I'm not too familiar with this subject. Perhaps [people name who familiar] able to help you.
However, giving an answer that we are not familiar/no idea/pretend that we know just because we are senior/supervisor/specialist (in the end, it still the ego problem). Later our colleague/junior/sub-ordinate google the problem and find out that we are bullshitting, we will lose our credit. They will think that we are a [label for a person who don't know the subject but act like an expert].

Instead of letting other people to think I'm a clown (my defination for that label), I would rather just say "I don't know, let us check the online documentation and maybe we can find something there".

Thursday, August 14, 2008

Mysterious Date Bug

Ever wonder why the function/procedure return different result although the same date value has passed in. Here is my story.

A date is retrieved and calculated to generate specific key, like example below.

d_Date := GetMyDate.SpecialDate();
n_Key := GetMyKey.GetKey(d_Date);

GetKey() returned a negative value, which is wrong. Using the put_line to show the SpecialDate() value and it returned the correct date.


We hardcoded the d_Date value and check the key again.

d_Date := to_date('08-Aug-08', 'DD-Mon-YY');
n_Key := GetMyKey.GetKey(d_Date);

Now the key return the correct value.

This gave me puzzle. As we can see here, the same data is passed into the function and the return value for one is correct but the other is wrong. First I thought there is mysterious oracle bug and somehow the date format has changed or something. I ask for a senior to check for us and after a while we finally found where is the problem came from.

The SpecialDate() function retrieve the date value from a table which stores year 0008 and the hardcoded date value is 2008 (How oracle knows it's 2008 and not 1008/3008?). Both show year 08 on the screen but in truth, they both hold different value.

In conclusion, use YYYY year format instead YY because you might scratch your head for hours just to figure what went wrong.

Wednesday, August 6, 2008

Vista Blank Screen Mouse Cursor

I have seen a lot of Vista bashing on the internet but this one really happened to one of my family member.

Couple of months ago, my sister-in-law bought a new laptop (Dell inspiron 1420 with vista pre-installed) and from my point of view, I thought it was a Windows XP machine. To my dismay, she went for the Window Vista instead. Since it was her laptop and windows xp is going to phase out soon, I assume having a Vista pre-install may prolong her laptop lifespan and support.

One night, she came for my help after she faced a rather critical problem with her laptop. After the laptop booted up, the screen only showed black screen and a mouse cursor. I couldn't get the task manager (ctrl-shift-esc) to show up and neither ctl-alt-delete did any good. I hard reset the machine and Vista allowed me to choose the safe mode option. Ironically, safe mode showed me the version of the Vista installed is SP1 and again, it still blank screen and a mouse cursor (The new black screen of death?). Then her boyfriend told me that he had run the repair option for Vista but it still not working.

Anyway, I googled the problem (search for: vista blank screen mouse cursor) and found some information about this bug but there are no solution except to reinstall Vista. Some say it was caused by certain program or driver that are not compatible but for home user, how do we know?

In the end, I recommended the reinstall option to her and fortunately her boyfriend were willing to help. I also advised she get an external hard disk to store her personal files, so if it happen again at least she still have her files accessible. Beside that, I was tempted to recommend Ubuntu to her but on second thought, I know she is a type of character that doesn't like to change. Maybe I'll just wait until she is fed up with it then maybe Ubuntu will come to the rescue. :)