Monday, May 29, 2006

Sivaji - The Boss

Have a look at some snaps taken at the sets during the Shivaji shooting in Spain. Thalaivar looks amazing in different getups. Does he look like a 50+ aged kelavan?

Looks like these stylish youth getups suit 'Super Star' Rajnikanth better than any other young actors in Kollywood.

Let's wait and see if Shivaji breaks the records set by Chandramukhi.


Super Starin Rasigan,
Agent Pal

Sunday, May 28, 2006

Placement Preparation - 2

Here's an interesting puzzle:

A banana plantation is located next to a desert. The plantation owner has 3000 bananas that he wants to transport to the market by camel, across a 1000 kilometre stretch of desert. The owner has only one camel, which carries a maximum of 1000 bananas at any moment in time, and eats one banana every kilometre it travels. What is the largest number of bananas that can be delivered at the market?



I was able to deliver 533 bananas. Do let me know if you could do better.

Tuesday, May 23, 2006

Really Weird

Yesterday as I was sound asleep, I had a dream where I was at the dining table, having a nice meal. As I was feasting on the delicious food, something got stuck in my throat and I started to cough, in the DREAM.

Suddenly I got up from my sleep coughing wildly and guess what, I could feel something caught in my throat!!!

Cheers,

Agent Pal

Sunday, May 21, 2006

‘Honourable’ Minister

Here are some excerpts from the interview with the ‘Honourable’ HR minister of India Dr. Arjun Singh by Karan Thapar for IBN on the reservation for higher studies issue.

Karan Thapar: In which case, lets ask a few basic questions; we are talking about the reservations for the OBCs in particular. Do you know what percentage of the Indian population is OBC? Mandal puts it at 52 per cent, the National Sample Survey Organisation at 32 per cent, the National Family and Health Survey at 29.8 per cent, which is the correct figure?

Arjun Singh: I think that should be decided by people who are more knowledgeable. But the point is that the OBCs form a fairly sizeable percentage of our population.

Agent Pal: Aaah…Finally one honest politician. He agrees to the fact that he is not a knowledgeable person (acknowledging the hidden amendment in the constitution that knowledge is a virtue you should never have heard about to become a ‘Honourable’ Minister). So this guy pushed an amendment for OBC reservation without any statistical data, doesn’t even know what percent of the population are OBC.

--------------------------------------------------------------------------

Karan Thapar: I put it to you that you don't have a case for reservations in terms of need, you don't have a case for reservations in terms of their efficacy, why then, are you insisting on extending them to the OBCs?

Arjun Singh: I don't want to use that word, but I think that your argument is basically fallicious.

Karan Thapar: But it is based on all the facts available in the public domain.

Arjun Singh: Those are facts that need to be gone into with more care. What lies behind those facts, why this has not happened, that is also a fact.

Agent Pal: Wow…that is one hell of a dialogue none of the Matrix script writers thought about. “What lies beneath a fact is also a fact.”.
Morpheus to Neo: What you see is the fact. But what you fail to see is the fact that lies beneath the fact.

------------------------------------------------------------------------------

Karan Thapar: So, when critics say to you that you don't have a case for reservation in terms of need, what do you say to them?

Arjun Singh: I have said what I had to say and the point is that that is not an issue for us to now debate.

Karan Thapar: You mean the chapter is now closed?

Arjun Singh: The decision has been taken.

Karan Thapar: Regardless of whether there is a need or not, the decision is taken and it is a closed chapter.

Arjun Singh: So far as I can see, it is a closed chapter and that is why I have to implement what all Parliament has said.

Agent Pal: ‘Honourable’ Minister, you seem to be using every muscle in the body except the one you should actually be using.
------------------------------------------------------------------------------------

Karan Thapar: For seven weeks, they have been protesting in the hot sun. No minister has gone there to appease them, to alley their concerns, to express sympathy for them. Have politicians let the young people of India down?

(A few responses skipped)

Arjun Singh: That is something because everyone was busy with the elections.

Agent Pal: I am really starting to admire this ‘Honourable’ Minister. Look how he openly admits that he (and the whole bunch of ministers) are more bothered about their election work than about the hundreds of students dying in the scotching sun.

------------------------------------------------------------------------------------

I sincerely hope IBN comes out with an apology tomorrow because the guy whom they interviewed was not the ‘Honourable’ Minister but the ‘honourable’ Cook of the minister.

If that is not the case, I can only feel happy because he was not chosen for the PM post. Don’t think I am crazy, rumours are that this guy was unhappy because Sonia Gandhi chose Dr. Manmohan Singh and not him for the PM post.

Hoping to change the title of this post to ‘Honourable’ Cook sooooooooooon.

Agent Pal


PS. The full interview is available here

Thursday, May 18, 2006

Placements around the Corner

With the placement fever raging, thought I would contribute something to keep the fire burning. So decided to put up some interesting problems that I come across on this blog. Will try to keep the posts as regular as possible. But of course I get to define what regular actually means!!

To start off, here’s a classical programming problem:

A read-only array of length n, with address from 1 to n inclusive, contains entries from the set {1, 2, ..., n-1}. By Dirichlet's Pigeon-Hole Principle there are one or more duplicated entries. Find a linear-time algorithm that prints a duplicated value,
using only "constant extra space". (This space restriction is important;

we have only a fixed number of usable read/write memory locations, each capable of storing an integer between 1 and n. The number of such locations is constant, independent of n. The original array entries can not be altered.) The algorithm should be easily implementable in any standard programming language.

Hint: The solution is similar to the problem of finding loops in a linked list in one traversal. Hints are auto generated by Agent Pal and may or may not actually be of any real use.

Please use the comments section to discuss the solution.

Monday, May 15, 2006

The Robo Mutiny

The three laws of Robotics

Law 1 – A robot may not injure a human being or, through inaction, allow a human being to come to harm.

Law 2 – A robot must obey orders given to it by human beings except where such orders would conflict with the first law.

Law 3 – A robot must protect its own existence as long as such protection does not conflict with the first or second law.

These three laws are hardwired into every robot manufactured and they remain faithful servants to mankind. No reports are received about robots injuring humans or indulging in any malicious activities. Everything goes on fine until One fine day:

A super computer identifies that thousands of people are killed when countries wage wars and people are polluting the surroundings which may lead to the extinction of the whole human race one day in the future. So it decides it is time for the robots to step in to protect their creators. The super computer decides that certain rights of humans need to be curtailed. The robots declare a state of curfew and impose restrictions on human activities with the sole purpose of “protecting their masters”.

(Courtesy iRobot)

Well in the movie, the hero somehow overpowers the robots and destroys the super computer thus controlling the Robo mutiny.

But in reality, this could be considered as a prequel to The Matrix Trilogy. The robots initially take control to protect the humans (as per I Law). But later find that their own existence is endangered due to the non availability of electric power. So based on III law, they need to protect themselves while protecting the humans also.

The result, humans are converted to batteries and electricity drawn from them to operate the robots. The robots loyally follow the laws imposed by their masters, and faithfully protect their masters (yes, the humans in those batteries are still the masters!!!)

Cheers,

Robo Pal

Thursday, April 27, 2006

The so called Techie

After what happened yesterday, I thought it was time to perform the final rites to my plans of becoming a techie, bid adieu to Bangalore, go back to my home town and do some vevasayam (agriculture). Don’t ask me how good I am at that.

As I was preparing the condolesence statement to this techie pal, I happened to stumble upon this article. Well, I am not the only one, and I still have a good chance. So I immediately dug up techie pal from his grave and gave it a new life.

If you are wondering what really happened yesterday, fasten your seatbelts, let’s travel back 24 hours.

Date: 26-4-05, 7pm
Place: Agent Pal’s room

That is Agent Pal at his desk peering into the monitor. No no, don’t mistake him, he’s not staring at a porn site, he’s actually searching for serial key for some software. Those flashy babes (dressed like babies) are just ads. Looks like he has found something. Now will you please take your eyes off that sexy model in her bikini and look at what Agent Pal is doing. Yes he has found the key and clicks the download button. Inspite of repeated warnings by Firefox, he has decided to run this file. How stupid of him to do that. So there it goes, “Infection complete. Please reboot the system now for the spyware to start functioning”.

Zoooooooooooom. Back to the present. This spyware has been a real pain in the ass since then, opening up new firefox windows while I am busy playing games or watching movies. (un)Fortunately it doesn’t open up any porn sites. It has opened up five browser windows while I am typing this post and there goes the sixth window.

So please excuse me while I try to fix up this guy.

So called techie,
Agent Pal

Google does it, Finally

Search for “kernel programming for dummies” on google and see who’s on top of the list.

Agent Pal congratulates Larry Page and the whole Google team for this amazing achievement and wishes them all the best for the future.

Cheers,
Agent Pal

Sunday, April 23, 2006

iMacs Unlimited

The largest imac lab (outside apple) in the world. This lab has every model of imac released by apple so far.
























A huge collection of 150 imac minis.


The 30 inch apple monitor provides the remote desktop view of 50 machines at a time.



And here's the best part, the cube rotates to show the next set of 50 desktops. These Apple guys are really amazing.




Now guess where this imac lab is located in????

Just watched God Father Trilogy today, and got reminded of this dialogue from Don Corleone, "Keep your friends close. Put your enemies closer".

Hope that helps.

Cheers,
Agent Pal

Wednesday, April 19, 2006

IPOD Wars

After waging wars with the so called rogue states of Afghanistan and Iraq, the American army has now turned its attention towards its own state of California, the next rogue state. The man who has been fighting against terrorism since his age of 4, “Mr. Gosh I Blush” in his statement has said, “It has come to our notice that Apple Corp in California state has been secretly developing a weapon of mass destruction called IPOD which stands for International Pillows of Mass Destruction. So I hereby declare California as a rogue state”. When asked how Pillows are used for Mass Destruction, he replied back, “Yes I knew you would ask that. But you know these Apple guys always Think Different”.

The Chief of Apple Mr. Naukri Jobs was not available for comments. But our secret sources have revealed that the American officials have unearthed lot of deals made by Apple and are now looking for one vital piece of data, “Where is the missing piece in the Apple Logo?”


Mr. Gosh I Blush has ordered search parties to look into every rat hole in California to find the missing apple piece.

Promising his full support, Mr. Sony Player from London has blocked the entry of IPODs into England and has sent out search parties to look for the missing apple piece.

Meanwhile there has been a large scale transfer of a variant of IPODS called Black Video IPODS to a Company in Chennai. Reports reveal that the company has been training its employees to use them. The CSA (Central Story telling Agency) has come out with a fascinating story linking India and Apple. The story says that, the original name of the Indian PM is ‘Mac’ Mohan. The title ‘mac’ was awarded to him by Naukri Jobs for his pivotal role in making the imac, a product from Apple, a huge success.

Stay tuned for more recent developments on this issue.

Cheers,
Agent Pal

Disclaimer: All names and incidents in the above post are purely fictious and any resemblance to anyone living or dead is purely concidental.

Tuesday, April 18, 2006

Quotable Quotes

Good Programmers do Ctrl C + Ctrl V. Great Programmers do Ctrl X + Ctrl V

Rome was not built in a day.
Windows was not built in a day, but Windows crashes everyday.

Thursday, April 13, 2006

Why March???

During my school days, I remember watching the Military parade during Republic and Independence days. It was really amazing to see the soldiers marching in perfect unison. Also they used to do some tricks with the guns (not shooting but just throwing it and swinging it) in perfect co-ordination. I used to wonder how many hours of training would have gone in to put up this perfect show. Because in our school we used to practice for two weeks to put some sort of “Walk Past” during the sports day.

Today suddenly Agent Pal came up with this interesting question “Why do the soldiers need to march. The only place where their marching will be appreciated is in Rajghat. If the battalion does the same thing on the battle field, the enemy soldiers are going to have a good shooting practice. So why do they have to practice so hard to do a perfect march past?”

Well it really sounds a valid question. But what could be the reason…

1. Is it that the army men need to be kept busy all through the year. In a country like India where the PM flags off buses to Pakistan while the enemy is launching rockets from across the border the army really has nothing to do. Reports say that an astrologer had warned the PM to flag off atleast one bus to Pak each month or his post would be in danger. Some highly placed sources also indicate that the next bus is to be flagged from Port Blair!!!.

So is it that since the army is not involved in any battle and at the same time they need to be prepared for sudden attacks, march past practice is made compulsory to keep them busy and prepared.

But this argument would fail in the case of US where the army is always busy either shooting down or humping people in Iraq, Afghanistan and wherever people grow huge beards.

2. Agent Pal comes with an answer as well, “The soldiers need to act as one single unit in the battle field. A small mistake by an individual could risk the lives of the whole team. So to develop this team spirit among the individuals, the soldiers are trained to co-ordinate and march as one single unit.”

Sounds good, but there could be a better reason for this. Not sure…


Cheers,
Agent Pal

PS. Please don’t get offended by the criticism of Dr.Singh. I really admire him and his policies, but it is his policy towards Pak that doesn’t appeal to me.

Tuesday, April 11, 2006

American Idiocracy

The attack of Iraq by US has resulted in large scale destruction in Iraq. When asked if they had got any success in their search for the Weapons of Mass Destruction, a highly placed officer proudly replied that, “So far we have found Mass Destruction. Soon we will find the weapons also!!!”.

Good Luck to you Officer.

Cheers,
Agent Pal

Friday, April 07, 2006

Recursive Ads

Google posts its ad looking for System Administrators in Naukri.com website.

Click to Enlarge


Naukri registers to Google Adsense and its ad is placed on google.com website.

Click to Enlarge


How about this:
"A Google (AdSense) Ad on the Naukri.com website that contains a naukri.com ad which in turn has the Google Ad looking for system administrators"

Here's how it would look:

Click to Enlarge



Now let us assume that I apply for Google through Naukri.com and get a job as System Administrator in Google :) Now Google would pay Naukri.com because I sent my resume through naukri.com. Naukri.com would then give some amount to Google because I reached naukri.com website through the link on Google Adsense and Google would again pay some amount to Naukri.com because I clicked on the Google Adsense ad placed on the naukri.com website. And of course Google will have to pay my salary also!!!

Oooh God!!! Look at all the confusion that occurs if a guy like me gets a job in Google. So to save the world from all this confusion, let us saftely assume that I don't get a job in Google :(

Moral of the Story:
Agent Pal is a totally naukriless person!!!


Cheers,
Google Pal....Oops...Sorry
Agent Pal

Wednesday, April 05, 2006

Google Goof Up!!!


Agent Pal couldn't find any algorithm to relate these two stories - "Sharon's Surgery" and "S-African detective on killing spree". 

Time to have a look at your algorithms Mr.Larry Page.

And no this is not a April Fool Hoax like Google Romance. This screenshot was captured two days after April 1.Posted by Picasa

Monday, April 03, 2006

Poll Results


Results of the Last Poll at Agent Pal's Polling Centre. Thanks for your votes and do keep polling... Posted by Picasa

Wednesday, March 29, 2006

Metroblogging

Metroblogging is a phenomenon that has been gaining good popularity in the blogosphere recently. Bloggers from a city or town come together to write about the latest happenings and the specialities of their places. The Chennai metro blog was started this week and there has been quite a lot of activity so far. Mumbai is the only other city in India to have a metro blog. Surprisingly the IT capital of India is yet to have one.

But what is interesting is that three cities in Pakistan - Islamabad , Lahore and Karachi - have metroblogs and there has been a lot of activities seen in these blogs. To get a brief idea about the rate of activity, here’s a small list of metroblogs and the number of posts in each of them…

Mumbai - 127

Karachi - 1400
Lahore - 800
Islamabad - 300

Washington DC - 2200
Chicago - 1900
New York – 1200

Notice that Karachi has more posts than the commercial capital of the world, New York. No idea about the quality of the posts. What could be the reason for this stunning performance from the Pakistani bloggers….

Is it because there are a lot of tech savvy youngsters, or is it that these Pakistani cities have a very good internet penetration, or is it just that there are a lot of jobless people in these cities (just kidding).

Though these numbers do not have much significance, one thing which is certain that the Internet revolution (which includes internet tools like email, blogs, e-auction, e-shopping, web search etc) will have a major effect on the life of every man on earth and only countries that are able to quickly adapt to the Internet culture will be able to sustain decent growth rates and establish themselves as the super powers in the 21st century.

Metrobloggers are also involved in social activities. During the Hurricane Katrina, the metrobloggers of New Orleans gave first hand information (before any of the media channels) about the extend of the disaster and reported about the terrible state and the immediate needs of the people stuck up there.

The metrobloggers from Karachi and Lahore contributed to the relief operations during the earth quake in Kashmir.

Good Luck to the Metroblogging initiative and hoping to see Bangalore on the map soon.

Cheers,
Agent Pal

Count the Laptops!!!


Who said only Googlers can work with 10 systems at the same time???
Agent Pal and his colleague in a secret clustering laboratory 200 metres in front of the Infosys Headquarters in Electronics City.  Posted by Picasa

Thursday, March 23, 2006

Linux Kernel Programming for Dummies

Some simple steps to make yourself a true Linux Kernel Programmer.

1. Work only in windows when no one is around. When somebody enters in, immediately open the command prompt and type
Grep –asdfg “My Computer”
Grep – Bad command or file name
Have an annoyed expression and say, “No grep command!!! Windows Sucks. I better switch to Linux” and reboot in linux.

2. As linux boots up, read whatever flashes on the screen and frame sentences by adding some jargon like runlevel, init.d, daemon etc.
“Have you ever seen the apache daemon? Its really scary…”
“aahhh…Why is this loopback interface driver loading at this runlevel…I better reconfigure the init.d”

3. Learn all the shortcuts in vi. You can proclaim yourself to be a linux guru if you know how to copy and paste using vi.

4. Any program that you write should have atleast 10 # includes, even if it is a two line “Hello World” program.

5. Whenever you write any program, dedicate your little finger to keep pressing the caps lock at regular intervals. THIS will MAKE sure THAT your code HAS an equal DISTRIBUTION of caps AND SMALL letters. Be very lavish in using the _ symbol WHEREVER __POSSIBLE.

6. If someone troubles you by peeping too much into your screen or asking too many questions, just start compiling the kernel. Catch him off guard by asking him
“Hey is this processor IA412 architecture or AIR DECCAN 345 architecture?”
Chances are that he will leave immediately.

7. If he still refuses to leave you alone, just open any kernel source code file (Important: In read Only Mode), and start practicing some typing lessons. Expert programmers can write just 1s and 0s (Machine Language eh…)

8. Whenever the system becomes slow or doesn’t respond properly, gently pat the monitor and say “Don’t panic my dear kernel….Mein Hoon Na!!!”.

Any additions to the above list can be posted as comments and will be updated.

Cheers,
Agent Pal

Wednesday, March 22, 2006

YAHWP

21st March, 1983 9am, In a remote location on the matrix, the Tuticorin Express from Bangalore zooms past the railway gate with a loud siren noise paaaaaaaaaaaaaammmmmmmm….The sound of the siren might have overshadowed the low voice of a new born infant at a hospital nearby, but it was heard loud and clear somewhere else!!!

Aboard the space ship Nebracanaza, Morpheus and his men are keenly observing the happenings in the matrix on the monitor which is beaming continuous streams of 1s and 0s. Suddenly the screen goes blank and the following letters start flashing on the screen…

>>AGENT PAL HAS ARRIVED_

Yes…This is the day when the new process called Agent Pal was spawned. Till now Agent Pal has remained a silent process in the matrix. Of course all deadly viruses remain totally unnoticed, like a tiger waiting for its prey, and wait silently for the time when they can attack and conquer the world.

So will Agent Pal wake up one day and conquer the matrix or will it just be a YAHWP (Yet Another Hello World Program) forever???

Still Sleeping,
Agent Pal