Friday, July 08, 2005

Another in-humane strike

Oh lord, let the souls rest in peace.

Saturday, April 23, 2005

MSN Today Snapshot

MSN Today Snapshot
Originally uploaded by CodeCanvas.
Came across this on the MSN Today. Seems we can download msn messenger again with msn messeger. Well, thanks for letting us know.

Saturday, October 09, 2004


This is a test post from flickr, a fancy photo sharing thing.

Thursday, September 09, 2004

Qantas gripe sheet

I am not the usual kind who forwards funny emails around, which are forwarded to me by my friends, who get forwarded messages from theirs and who get .... well you get the picture, but this one is good to be mentioned.

Qantas is an airline company based in Australia......

After every flight, Qantas pilots fill out a form called a gripe sheet, which conveys to the mechanics problems encountered with the aircraft during the flight that need repair or correction. The engineers read and correct the problem, and then respond in writing on the lower half of the form what remedial action was taken, and the pilot reviews the gripe sheets before the next flight.
Never let it be said that ground crews and engineers lack a sense of humour. Here are some actual logged maintenance complaints and problems as submitted by Qantas pilots and the solution recorded by maintenance engineers. By the way, Qantas is the only major airline that has never had an accident. (P = The problem logged by the pilot) (S = The solution and action taken by the engineers)

P: Left inside main tire almost needs replacement.
S: Almost replaced left inside main tire.

P: Test flight OK, except auto-land very rough.
S: Auto-land not installed on this aircraft.

P: Something loose in cockpit.
S: Something tightened in cockpit

P: Autopilot in altitude-hold mode produces a 200 feet per minute descent.
S: Cannot reproduce problem on ground.

P: Evidence of leak on right main landing gear.
S: Evidence removed.

P: DME volume unbelievably loud.
S: DME volume set to more believable level .

P: Friction locks cause throttle levers to stick.
S: That's what they're there for.

P: IFF inoperative.
S: IFF always inoperative in OFF mode.

P: Suspected crack in windshield.
S: Suspect you're right.

P: Number 3 engine missing.
S: Engine found on right wing after brief search.

P: Aircraft handles funny.
S: Aircraft warned to straighten up, fly right, and be serious.

P: Target radar hums.
S: Reprogrammed target radar with lyrics.

P: Mouse in cockpit.
S: Cat installed.

P: Noise coming from under instrument panel. Sounds like a midget pounding on something with a hammer.
S: Took hammer away from midget

Monday, September 06, 2004

Trigger instead of relational constraint in MS SQL

Recently during a project I faced with a problem in DB designing, I had to create a relation between more than three tables in various levels as follows

Table 1:

Id - Primary key
Name - Unique

Table 2:
Id - Primary key
Table1_Name - References Table1(Name)

Table 3:
Id - Primary key
Table1_Name - References Table1(Name)
Table2_Name - References Table2(Name)

Well, the above is a very breif representation of the architecture used in the system for the sake of clarity.

So once this setup is done, sql wouldnt allow to have update / delete on cascade for the Table1_Name column on Table3.

One way to work around this problem, which I am using now, is to remove the foreign key reference from Table3 and add a "For Update" and "For Delete" trigger on table 1 which will take care of the updation and deletion work on Table3.

Disadvantage to this approach will be that I will have to remember to update the trigger if in case the strucuture of Table3 changes. But then I will be removing this kind of design on the next architecture revision of the system, till then this can be used.

The Trigger:

Create Trigger Table1_Update On Table1
For Update As
Update Table3 Set Table3.Table1_Name=inserted.[Name]
From Table3, inserted, deleted
Where Table3.Table1_Name=deleted.[Name]