Sunday, July 27, 2008

Movie: Catch me If you can



No, I am not saying so. It’s the movie name, I am talking about. Released in 2002 and directed by my favorite director Steven Spielberg. The film is based on a real story. One should have enough patience to watch the movie. Here, I am not going to give any review comments or story detail, since it can be found in several other web sites.

Will talk about other few detail. Usually, it’s my habit to ‘understand’ the movie rather than simply watching it. That’s, after watching any movie, I go to google, check out the complete artist detail, filming location, movie mistakes (let’s talk about it later) and etc.

  1. Retrieve the artist detail, filming locations from: http://imdb.com
  2. Movie mistakes from: http://www.moviemistakes.com/

Coming to movie mistakes, it captures logical mistakes in the movie scenes or in screen play. it’s a real fun to know the mistakes made in movies. The http://moviemistakes.com is a best source to find all movie mistakes and laugh out ourselves.

I am totally surprised to see the kind of mistakes people have captured from this film. Especially this one is a too good catch!

At one scene, the hero looks out the window of the jet and says, "there is La Guardia Airport, runway 44." But, one guy has caught it – “Airport runway numbers are derived from their compass heading and go from 01 to 36, so there is no such thing as ‘runway 44’ The runway number should be within 01 to 36, and hence runway 44 is invalid”.

How crazy people are they to catch such mistakes? :)

Also, now I like the kind of audience out there!

Monday, July 14, 2008

Hosting, Domain name - cheap price list.

Following is the list of few companies that offer domain name registration service at cheap price (less than $10 per annum). Note that this is the price only for domain name registration. Hosting and other services will be charged separately.

As on Jul 2008:

Company

Price

NetFirms

$4.95

Yahoo

$4.98

EV1Servers

$5.99

Hostway

$6.95

Stargate

$6.95

Interland

$7.95

Web.com

$7.95

AIT Domains

$7.99

Go Daddy

$8.95

RegisterFly

$9.99



Tuesday, July 08, 2008

And the Answer is...

Thanks to Shan, and Yasar for spending their time at answering my question in the previous post!

Even I too don’t know the exact answer, but I am happy with your answers. So, you may be called ‘Mr.Smarts’ as going forward! J

Ok. Let’s once again become energetic Comp.Science students and discuss this issue in detail.

Question is: “Whats the most efficient way to sort a million 32-bit integers?”


I went and searched for the answer a lot on google, but no direct answer was found. Google is very smart in asking such interview question, which you probably can’t find from internet.

Let it be.

My answer goes like this:

In Comp.Science, there are lots of classical problems. When you encounter such question, try to see if you can match it with some existing problem. Or, try to find out the base ‘Problem Class/Type’. Yes, you can map most of the problem to a Data Structure or Algorithm!

Consider the priorities and scenarios in this case.

(Before that, remember Sorting Thumb Rule #1: Bubble Sort is a wrong way to go! :) )

1. If memory is a constraint:

Suppose, if you need to sort a million integers in a system which has a tight memory constraint, and then go for External Sorting or Merge Sorting or External Merge Strategy (Combined).

Since, Merge sorting takes only O(nlogn) time (at average case and as well as at worst case)!. The combined External sort mechanism can help you to assist ‘Divide and Conqueror’.

2. If speed is the constraint (and not memory):

Two choices: Quick Sort, Heap Sort, Merge Sort.

Quick Sort: Gives you O(nlogn) speed. But, this sorting approach is little dangerous. Because, if your input (1 million integers) is close to already-sorted form, then the Quick Sort will slow down to the speed of O(n^2) .

Also, Quick Sort is unstable sort! Quick sorting is based on recursion (recursion means stack.. stack means more memory). So, the repeated recursion calls can tend to hog more memory.

But, you stand a good choice to use parallelism. That’s quick sort creates lots of temporary partitions. So, you can distribute these portions across various processing units (say, across a cluster).

One important thing is, if you have N number of processors, each processor can process a partition, than you can complete the sorting by O(nlogn)/N = O(logn) !

That is an extreme performance as it is in Linear Time!

Heap Sort:

Takes very less memory – good point.

Runs at O(nlogn) time, even at worst case – Too good point! :)

Not sure about partitioning.

One should definitely consider HeapSort, when speed is a constraint.

PS: I have NOT taken or NOT got this answer from anywhere/anybody! The answer is purely based on my own thoughts, so it MAY NOT be 100% correct!

Monday, July 07, 2008

Tough Question, Excellent Answer!

Just happened to see this video in Youtube: Barack Obama (U.S Presidential Candidate) is being interviewed at some Google office (a funny interview).

Not sure, why Obama gave an interview at Google (may be a kind of social, or industrial issue based interview).

The interviewer says “winning U.S presidential election and getting a job at Google – both are equally tough”. So, the interviewer throws some tough computer science interview question to Obama just for fun.(If you are Comp.Science student, then you would be already knowing how tough the google interview questions are!)

The question is: “Whats the most efficient way to sort a million 32-bit integers?”

Don’t know how many of you would start thinking and try to answer some thing immediately..!

(Youtube video link: http://www.youtube.com/watch?v=1nnj7r1wCD4 )


But, great to my surprise, Obama suddenly responded “I think… Bubble Sort is the wrong way to go!” – Excellent answer.

I could have clapped, if I were sitting at the audience side. Even a computer science graduate cannot suddenly answer this kind tough question. Anyway, though he didn’t tell in what way it can work, he told an other way in which it cannot work. May be that’s should be a personality identification for some high profile jobs like U.S President :-). All the good luck to Obama!

Let it be.

I am very curious to know how many computer science graduates can bring out the right answer (or any relevant correct answer) for the same question. I’ve some answer in my mind. Don’t know how far it’s correct.

If you are a computer science student, you could refer any books, internet, discuss with people and do etc. Post the answer within one day – I’ve a very nice title waiting for you – if your answer convinces me :)

Question is repeated:

“Whats the most efficient way to sort a million 32-bit integers?”

Wednesday, July 02, 2008

Software Engineers spoiled the culture!


This is what I hear wherever I go!:

  • You Software Engineers spoiled the culture!
  • You Software Engineers hiked prices, increased the inflation!
  • Because of you guys, the real estate prices gone up!
  • Because of you guys, all the prices are going skyrockets!
  • And because of you guys, it is not raining nowdays! (Somebody told this too!)


I am just shy to say that I am also a Software Engineer.. Whenever somebody asks what profession I am into, I simply say I do designing and coding work for a specific future of a product module.. that may work or may not work.. and whatever the case it is, I am paid for that.. (totally giving a confused answer to that guy)… so, that the guy gives up his question. (but I am very careful in not using the word ‘software’ in my answer
:) )

Whom do you think has spoiled the culture?

Nowadays, boy friend, girl friend, dating & etc – all these jargons start from school level. But, they are controlled by the parents, teachers, and the school administration. But, still they are not convinced and awaiting for the chances. When you get any decent job (note: any job, not only the software jobs!) you stand a good chance to enjoy your life – especially when you are totally away from parents. It’s up to individual’s wish to be in control! If you run out of control, the mistake is yours, don’t blame software jobs. As years pass by any culture will be liberated – that’s a common truth. Just in case if there is no single software job in the country, you will still see the same culture lasting or even it is going worse! Because, it’s matter of time that changes the culture!

Remember, Gandhi was advising people in early 1940’s and people followed him. Now, do you remember how many followers were there in 1990’s, (before Software Jobs come in)? Now how many do you expect in 2008? The culture is being liberated in a proportional order with time!

In 1990’s you blamed cinema actors and models. Now it is the turn for software engineer.

Whom do you think has increased the price?

Software jobs pay multifold of what a common man can get from other jobs. So, because of this, the prices go up. True. But, do you want to stop it? Just hold on.

Some 10 to 20 years back, when Software Jobs were not there in India, still there were people who used to get multifold salaries – say Engineers, Doctors, Collector and etc. At that time, didn’t you see prices were going up? When our fathers were into none of these professions, did we go and blame others for their multifold salaries? No. So, why are you blaming us now?

When the junior generation is getting multifold salaries, growing like rockets, you need to be happy about it and try to join it, if possible.

See, we never thought that an Indian would become world’s No 1 rich. It happened. We never thought that lots of money will flow in India. It is happening now. You should be either working hard to compete with the growing generation, but not to be fighting with them or stopping them from growing.

I can tell you one strong comment from my observation. It’s very easy to win senior generations. Mean, it is very easy to break the records of your father; but, it is always tough to compete with junior generations;

Who knows, our juniors may be getting multifold of what we software engineers are getting now! That’s how it will grow for sure.