Monday, October 29, 2007

Gone Baby Gone!

Watched 2 movies this weekend: Gone Baby Gone and Jab We Met(Hindi)

Gone Baby Gone is painful.....i mean its deep a movie to watch on a friday after a long work week. I also felt Casey Afflek's acting bored me to hell. Ben could have cast himself and would have done a better job.

Jab We Met was fun to watch. Not too serious, not too stupid...i think its a film i can classify as good "Time-pass".

Also took my doll out to Architecture Tour...i still amaze at the buildings in downtown.

Thursday, October 18, 2007

Watch out for my technical blogs!

Finally decided that tech blogging was the way to go...and here is the link:

Sunday, June 03, 2007

Vanity is favorite Sin!

When someone thinks too much of oneself then they are in trouble. I have seen this happen to so many people around me that it makes me sad that an individual can feel they are on top of the world and whatever they say and do is right.

What makes any one of us vain?

1. I am among the most beautiful human beings in the world
2. I have millions of dollars that i can spend and nobody can question me
3. The feeling that i can do anything and no one can stop me...

It is of paramount importance that we as humans care for what others think and we are all social animals.....we form the society and society forms us. All those people who do not care for their loved ones feelings are the ones in real trouble. Of course, we all know who love us dearly and we must pay utmost attention to their feelings first....if even one of them feel....that we are doing something wrong and question our is important to approach the issue with a clear and open mind. A vain person would brandish that person away...instead of clarifying it. People who are vain are always clouded with the thought that they cannot be wrong...everyone around them is at fault. That is why the most important advice for a vain person is this - "The world doesnt revolve around is the sun....and no amount of money/ beauty can change shut up and behave like one of us".

How to recognize if someone is vain or not? it may be harder than you think!

Tuesday, March 27, 2007

Java Tidbits - Copy file

I recently moved to a Java group in my company. One of the most important things for a programmer is a method to copy a file. Unfortunately Java does not have an API call to do it meaning i cannot call a FileHelper class and do a copy file.

One of the programs i found on the internet( with some of my modifications) was to use a buffered is the sample function

public static void copyFile(File src, File dst) throws IOException {
InputStream inputStream = null;
OutputStream outputStream = null;


inputStream = new BufferedInputStream(new FileInputStream(src));
outputStream = new BufferedOutputStream(new FileOutputStream(dst));

while (true)
int numofbytesread =;
if (numofbytesread == -1) break;
if (inputStream != null) inputStream.close();
if (outputStream !=null) outputStream.close();


A better and more efficient method would be to use File channels:

public static void copyFile(File src, File dst) throws IOException {
FileChannel sourceChannel = new FileInputStream(src).getChannel();
FileChannel destChannel = new FileOutputStream(dst).getChannel();
sourceChannel.transferTo( 0, sourceChannel.size(), destChannel );
catch (IOException e)
System.out.println("IO Exception occured while copying File. Stack Trace:");

Will update the blog with more Java tidbits as i learn something new.