Monday, September 25, 2006

Fuck'em

Recently i talked with my friend from college. We talked about java, ai, c#, computer science in general etc. I felt great and wanted to learn and work more. Now compare that with the kind of talks we have in our office during breakfast or lunch. Every day in the morning you will be reminded that you are poor, dont have a house, you are fat, you are dumb and they are smart in life and what not. Consider lucky if you dont have to go through all these. Fuck'em fuckem all.

Saturday, September 16, 2006

Fill in ..

I dont like the rice served at my home anymore .. sigh .. we use boiled rice but white one .. and now i have gradually started a liking towards the red rice .. which i think is a good thing as im not locked in to my home food anymore :) .. or maybe it may not be the exact version of rice which i used to eat earlier .. which brings me to this question
suppose you come late from office .. i mean really late .. like around 2:30 in the morning and you find that your friend has locked house and gone somewhere .. you dont have any other contacts in the city .. you are very tired ..there is a basement in the building and there is a coffin .. will you sleep in that ? .. you can listen to this song while thinking ..

Thursday, September 07, 2006

10minute movies


Saw "The Hire" series today .. these are short ad movies of BMW done by directors like John Woo, Guy Ritchie.. i saw some of them on my way back to home from office in shuttle .. during car chase sequences i felt like i was there in real :)

Wednesday, September 06, 2006

Static Checking

There are many things a compiler does which helps a programmer. Let me give an example of my recent experience

String name;
if (i == 0) {
name = getName();
if (name.equals("x")) {
doSomething();
}
} else {
name = getAnotherName();
if (name.equals("y")) {
doAnotherThing();
}
}


this is perfectly okay .. if we had forgotten the call name=getAnotherName() in the else condition, compiler would crib saying that name is not initialized.

Now in many code i see that people have a tendency to declare
String name = null;

in this case if you had forgotten to call name=getAnotherName() in else, the compiler would pass as name is initialized to null. And at runtime you will get a NullPointerException as you are doing null.equals("y")

In some places initializing to null cannot be avoided, but i believe, wherever possible dont initialize to null, it will help you

Sunday, September 03, 2006