Wednesday, June 09, 2010

Science Fiction Story

2041 AD.

Tarek sighed as he gazed across the harsh terrain that was once California.

It was seventeen years since the end of the Great War. Seventeen years without the warmth and light of the sun had stripped the land bare of all vegetation. Even if there was light, nothing would grow in this soil polluted by the ashes of a thousand atomic bombs. Humanity was all but extinct, with a few thousand scattered around the globe. But without food, without knowledge, the end of the human race was inevitable.

Mankind's only hope was The Book.

The Book, prophecy told, contained all the knowledge of mankind. With it, mankind could start rebuilding what the War had torn apart. It would lead mankind once again to great heights of civilization.

Tarek was the leader of a small band of wanderers who had been searching for The Book. After months of hard marching, tempers were now at a tipping point in the group. Rations were also running low. Tarek knew that they had to find The Book soon.

As Tarek trudged along, he began to ask himself: How can one book contain all the knowledge of mankind? Maybe there never was such a book. Maybe they were on a wild goose chase.

"TAREK!". Ebonil's shout broke Tarek out of his revere. "Take a look at this!". Excitement bubbled in Tarek as Ebonil pointed towards a mark on the rock. "Isn't this the one mentioned in the prophecy?". Ebonil was right! It was. "There should be an entrance to a cave nearby". "There it is!".

Tarek rushed into the cave. As his eyes adjusted to the darkness, a sense of destiny washed over him. In front of him lay the salvation of all mankind. He started to vaguely make out ... a pedestal, on which there was a black slab. The Book.

As he took it in his hands, Tarek realized: The Book was not a book: It was magic. At his touch, The Book began to glow, a glow not seen on Earth for seventeen years. Tarek was overcome with wonder. He began to explore the hidden magic of The Book.

Tarek studied The Book for many hours. It began to dawn on him that it held no knowledge. The prophecy was a lie. There was no wisdom in The Book, it was merely a curiosity. Disappointment washed over him as the hopes and dreams of the human race crumbled before him.

Tarek closed his eyes. He wept.

2011 AD.

Steve Jobs bans the Wikipedia app from the iPad.

Tuesday, June 08, 2010

What really happened.

A Linux programmer, a Windows programmer and an Apple programmer walked into a bar. They were having a heated discussion about which operating system is the best.

"Look, we'll never settle it this way", said the Apple programmer after many arguments, "I have an idea. Look at that girl over there". He pointed towards a smoking hot girl sitting alone at the bar. "Whoever impresses that girl with their Pen Computer will win the argument." They all agreed.

The Linux programmer went first: "Greetings, Female". "Hi", the girl responded. "You know, I just wrote this wicked Emacs macro in lisp to grawp mercurial and auto sync -". The girl tossed her drink at his face "Go away, you creep!". The Linux programmer went away dejectedly.

The Windows programmer was next: "Hi", he goes. "Hi", she replied. "Hey, check out this new game, you'll love it". He showed her a flash game with cute bunnies. "OMG! that's so cute". But just when she was about to give him her number: "Windows has performed an illegal operation and will shut down". "Whatever, loser". The Windows programmer also went away, head bowed in shame.

The Apple programmer kept his phone down on the table and straightened his collar. He went to the girl. "Hey baby, what do you think of this?". He shows her his MacBook Air. "Ooh! That's so cool. I wish I had one". She smiled coyly as she slipped a napkin into his hand "Call Me".

As he left the bar, he made sure that the Linux and Windows programmers saw his gloating face. He danced all the way to his home. He took out his key to unlock the door ....

That was when Gray Powell realized with horror that he had left his million-dollar iPhone prototype at the bar.

Sunday, May 23, 2010

Three-by-Three : Bollywood Cliches

Disclaimer: All images were derived from xkcd. I claim no ownership or originality.

Each row/column/diagonal depicts a cliche oft seen in Bollywood movies. Move your mouse over the row/column/diagonal captions to see the text.


Sweet
heart
Judwaa Police Balatkar Love
Triangle
B
h
a
i
B
h
a
i
L
o
v
e
L
o
v
e
J
a
n
a
m
J
a
n
a
m
Judwaa Police Balatkar

Tuesday, April 06, 2010

Greatest Hits: Volume II

A lot of people are visiting this blog right now (thanks to xkpj), so I'm going to shamelessly advertise my older blog posts. This is mainly to help people who don't want to crawl through all the crappy posts to find the few funny ones.

Slapstick/Parody/Silly

Kannada/Bengaluru

Geeky

Tales with a twist: These are stories which have a surprise ending.

Sunday, April 04, 2010

xkpj

Disclaimer: All images were derived from xkcd. I claim no ownership or originality.




Tuesday, March 30, 2010

Interactive story

Scene opens with a long shot. Location: Top secret Nuclear Missile Command. People are milling around. Suddenly the door opens and a harried looking man rushes inside. He is the NATIONAL SECURITY ADVISER. He is on the verge of panic.

NSA: Who's the lead programmer here? Where is he?

An intern points towards a lonely guy sitting in a cubicle on the far end. The guy JOE is fat, almost bald. He's wearing a faded t-shirt and drinking coffee from a paper cup. The NSA runs over to the cubicle.

NSA: Quick! We have no time to lose. We have to override the launch command!

JOE: Hey! calm down, man! What happened?

NSA: A janitor accidentally pressed the deploy button on our ICBM control! The missiles are pointed directly towards us! If you don't override the launch we'll all die! HURRY!


JOE is a programmer.

Monday, March 22, 2010

Unicode variable names in Java

Total I learned that you can have Unicode characters in your class/variable names.

public class Lang
{
 public static final int प्रियानंद  = 42;
 public static final int ಪ್ರಿಯಾನನ್ದ = 33;

 public static int ನನ್ನ(int x)
 {
  return x + 1;
 }
 public static int ಹೆಸರು(int x)
 {
  return x - 1;
 }
 public static void main(String [] args)
 {
  ನನ್ನ(ಹೆಸರು(ಪ್ರಿಯಾನನ್ದ));
 }
}

Note: You might have to specify -encoding Unicode when compiling.

Tuesday, February 23, 2010

Introducing Fair and Na'vi

Are you dissatisfied with your pale brown skin? Have you secretly fantasized about having pointy ears and a long tail? Then look no further. Hindustan Lever Limited in association with James Cameron is pleased to announce its latest beauty product: Fair And Na'vi.


Fair and Na'vi is specially prepared from extracts of Aloe Vera and Pandorum Unobtainium to give you that sleek blue look. Its fast acting formula enriches your skin to leave it smooth and shiny. Within four weeks you will see a visible improvement in your appearance or you'll get your money back.


That's not all! If you order a 12 pack before March 31, 2010, you'll be eligible for a chance to visit Pandora itself. Hurry! Offer valid till stocks last.



You may be wondering what to do with all the Fair And Lovely cream that you already have. Why would you want to be white when you can be blue! Fortunately you can use Fair and Lovely for many other things!


Five unexpected uses for Fair and Lovely


1. Converting black money to white money.
Just rub your illegal bribes/dowries/ill gotten jewelry with Fair and Lovely and within six weeks it'll be completely legal!


2. In Chess.
You're playing white and losing? No fear! Just rub the opponent's pieces with Fair and Lovely, and presto! the piece is now yours.



3. Changing Test match to Twenty20 match.
Forced to play test cricket because you only have a red ball? Just use some Fair and Lovely, and the ball will turn white in no time.



4. Changing Rap music into Country music.
Has you son started saying words like f*** and m**********r? Rap music is to blame! But don't worry, just rub the CD with Fair and Lovely, you'll have him listening to John Mayer in no time.



5. Changing Horror movie into Romantic Drama.
Boyfriend got a horror movie to watch? Just use Fair and Lovely and the movie will turn into a sentimental romantic movie.

Credits: The na'vi-fication of Aish was done with the help of this.

Tuesday, February 16, 2010

My name is Rrrawwr

Thunderous applause greeted President Barack Hussien Obama as he stood up and approached the mike.  A huge crowd had gathered to hear the charismatic leader address the nation. "Good Evening, citizens of the United States of America, and welcome - aaah!".

Everyone craned their necks to see what had startled the President. There was a tiger on the stage! A real, live asian tiger in Washington DC!

Now, if  it had been a big ferocious tiger, the president's gaurds would have shot it immediately. But it was a tiny little cub! With its large, playful eyes and its tongue hanging out of its mouth, the tiger cub frolicked happily around the stage. "Awww, he's cho cute", remarked First Lady Michelle Obama, an opinion which many in the audience shared. Even the president forgot the serious talk he was supposed to give and started playing with the cub.

Staring into the president's eyes, the cub mewed in a surprisingly human way. "Did you hear that? What is he saying?", the president asked. The cub made the strange noise again. Everyone was silent. The consulate general of India spoke up, "S-Sir ...I think it's speaking Tamil, an Indian language". "Well, what is it saying?", the president asked. The consulate general translated:

"I am a Tamil Tiger and I am not a terrorist.".

Tuesday, February 09, 2010

Moral Science Story 2

Once upon a time in ancient India, there lived a great rishi(sage) called Shulyaka. In order to please Shiva, Shulyaka undertook a deep penance. For 27 years, the great sage never wavered from his mediation. At last, Lord Shiva appeared in front of him. "Shulyaka, your penance has pleased me. I will grant you a boon unlike any other: When you are about to die, you can choose to bring one dead soul to life. tathaastu".

Many years passed, and the sage grew old. By this time, Shulyaka's fame had grown, and many had heard of his boon. People thronged his ashrama in order to try and get their loved ones back. After much deliberation, the other sages chose two people to present their case to the sage.

The first was a young lady. "Kind sage, I had been married only for a day when my husband died of an accident. I am now a widow, a fate worse than death. Please, bring my husband back".

The second was a small boy. "Greetings to you, sir. I have no father. My mother was very sick, yet she took care of me. Yesterday she succumbed to her illness, leaving me an orphan. Show me some kindness and bring her back".

As the sage was pondering, there was a commotion outside. A man burst into the kuTeera, holding a lifeless form in his hand. He cried, "I beseech you, great sage. Please have mercy on me. My daughter was playing in the river when this rabid dog bit her". Behind him a servant entered, carrying a dead dog. "Before we could reach and kill the dog, it had bitten my daughter. She is my only loved one in this world. Please save her", he implored.

The sage thought for a moment, and then announced "It is time for me to die", and fell dead. The young woman, the boy and the father all stared at each other, trying to guess who was chosen.

Lord Shiva summoned Shulyaka's aatma to kailaasa. "Who among the three did you choose: the husband, the mother or the child?", he asked. "O Omnipotent Shiva, I didn't bring any of them to life.", he answered, "By not choosing any of them I have saved all of them. The boy needs parents, the man needs a child and the lady needs a husband. Their tragedies have brought them together. If I had chosen one of them, the others would have been unhappy". "Very well", the Lord said, "so you wasted my boon". "No sire, I used it on the most deserving being. It is in the nature of the dog to bite; it cannot distinguish good from bad, innocent from evil. The villagers killed the dog for no fault of its own. Therefore I chose to bring the dog back to life".

"You fool," the Lord said, "after you brought it to life, the dog bit the man, the lady and the boy. They all died".

Moral of the story: Dogs bite.

(Thanks to RajeshV for the dog idea. He's written a sequel)

Wednesday, February 03, 2010

Ball Biting incident a viral ad campaign for Dabur Laal Dant Manjan

In a press conference sponsored by Dabur India Pvt Lmtd., Pakistani all-rounder Shahid Afridi made the stunning revelation that the infamous ball biting incident was actually a viral campaign for Dabur Laal Dant Manjan. Laal Dant Manjan is India's leading red-color-tooth-powder brand.


Speaking to the press, Dabur spokesman Mr Chaban Prash announced that the ball biting incident was only the first part of the cricket-themed marketing campaign. "We're negotiating with cricket commentator Madan Laal to get him to change his name to Madan Laal Dant Manjan".

Mr Prash also mentioned that Afridi will be replacing Mike Tyson as the Brand Ambassador for Laal Dant Manjan. "We're disappointed with Mr Tyson. He hasn't bitten anything in many years. Afridi on the other hand is an role model to kids. If he bites a cricket ball, millions of kids will start gnawing at random things".

Over the years many illustrious celebrities have endorsed Dabur Laal Dant Manjan. Here is a list of previous brand ambassadors.

During the freedon struggle, this ferocious "Dabur-man" bit 1754 British Army Officers before being brutally murdered. Inspired by its bravery, Manjan Laal Dabur made it the official mascot of the red colored tooth powder he invented. This is also the reason Laal Dant Manjan is banned in England even today.








With his hectic blood-drinking schedule, Count Dracula needs his fangs to be in great shape. What better powder than the Laal Manjan to keep his teeth sharp and ready? But since the demise of Dracula, Dabur has had a falling out with vampires; younger vampires like Twilight's Edward prefer Colgate.









Mike Tyson was more than an amazing boxer; he was also an exceptionally good biter. His moment of glory came when he bit off his opponent's ear in a boxing match. Subsequent scandals, rape convictions and prison stay has done nothing to diminish that one great moment when Evander Holyfield lay writhing on the ground, blood gushing from where his ear used to be.

Thursday, January 28, 2010

A True Brahmin

Radhesh Venkatesan (not at all related to this fellow) was a true Brahmin. Not one of those "maneli windows 95, beedili chicken 65"-type person. "praaN bhi jaaye, mutton na khaaye" was his motto, along with "I'll beg, but not eat egg". He regarded eating beef as the worst of all crimes. For many years his friends tried to tempt him with tandoori, seduce him with szechwan and bribe him with biriyani, but he didn't budge.

One day, the plane he was traveling in crashed. For two months people thought he was dead. But miraculously, after two months, news came that he was alive. He had been stranded in a remote Pacific island where he had somehow survived for two months. He was the only one alive from the crash.

I went to meet him when he finally returned. After enquiring about his health, I asked him about the question which was in my mind ever since the news had come. "On that island you were stranded in, there were no plants or animals"? "No". "The only food available was a crate of beef which somehow survived the crash?". "Yes, there was a crate". "So!", I exclaimed, "you finally broke your code. You ate beef.". "No, never! I never ate beef". "Then how did you survive for two months? You are lying!".

Radhesh was smiling as he answered "I wasn't the only one who survived the crash".

Monday, January 04, 2010

Mayan civilization sued after nothing happens on December 21, 2012

December 22, 2012.

The Apocalypse Association, a non-profit organization promoting calamities and disasters, has filed a lawsuit against the Mayan civilization, after the disasters predicted by the ancient South American people failed to occur.

"I'm disappointed that millions of people didn't die.", said Michelle Neifer, spokesperson for the AA, "Someone must be held responsible".

Indeed, December 21 turned out to be the most uneventful day in decades. The climate worldwide was pleasant, no assasinations or high-profile murders took place, and only 7000 people died in Iraq, which is way below the average.





Not the first failed prediction

This is not the first time a disaster prediction has fallen flat. Nostradamus predicted that the world would end in 1999, but nothing much happened. Computers were predicted to kill everyone due to the Y2K bug, but that turned out to be a hoax perpetrated by COBOL programmers.

"I'm sick of these lies", says Jody Killdred. Jody killed his dog to spare him an agonizing death during the Y2K scare, which turned out to be nothing. "But this time, I didn't even send my daughter to bed.", he added.

2102 not 2012

Dr Brian Juntilope, of the Canadian Mayan Institute, claims that we have had it wrong all this while. "You see, the Mayans write their years from right-to-left. So the disasters will happen, but in 2102".

While Dr Juntilope may be right, few people from the AA are willing to wait that long. "What's the point if it happens in 2102? I'll be dead by then", exclaimed Michelle.

Sequel to 2012

Unfazed by the lack of catastrophes, Roland Emmerlich, the director of the successful movie 2012, is already planning a sequel to the movie. Titled 2038, the movie is about how the world is destroyed by UNIX computers suffering from the Year 2038 Problem. The movie is set to hit theatres in 2014.

Monday, December 07, 2009

agony_aunt[0] : politically correct coding

Question I recently went to an interview where the lady asked me to design a payroll application. But after seeing my code, she got angry and called security guard to kick me out. I am now being sued for sexual harassment. I'm sending my code to you. Please tell me, where did I go wrong?

agony_aunt No wonder she threw you out! Your code is politically incorrect! Let me tell you why. Here's a piece of your code:

class Employee
{
Gender gender;
String name;
public Employee(String name, Gender gender)
{
this.name = name;
this.gender = gender;
}
...
}
...
Employee employee = new Employee("Ramya", Gender.Female);

Do you see what you did wrong there? You objectified women! You are such a sexist pig! Women should never be represented by objects. You should do this intead:

int calculateSalary(String name)
{
if(isMale(name))
{
Employee man = getEmployeeByName(name);
return man.getSalary();
}
else
{
//be careful not to create an object, not even a structure.
return getSalaryForFemalePerson(name);
}
}

The second mistake you did was here:

class Employee
{
...
int getAge()
{
return age;
}
...
}

You can't ask a woman her age! Thats rude, and in some countries, it's illegal! This is what you should do:

int getAge(String name)
{
if(isMale(name))
{
Employee man = getEmployeeByName(name);
return man.getAge();
}
else
{
throw new SexistException("Male Chauvinist Pig!");
}
}

Your comparison function is also totally wrong. What it should be doing is:

int compareEmployees(String emp1, String emp2)
{
if(isMale(emp1) && isFemale(emp2))
return -1;//men are inferior to women.
if(isFemale(emp1) && isMale(emp2))
return +1;//women are superior to men.
if(isFemale(emp1) && isFemale(emp2))
//woman with more jewelry wins.
return getJewelry(emp1) - getJewelry(emp2);
return 0;//all men are equally stupid.
}

Even though it is a payroll application, you always need to implement these functions:

boolean isFat(String name)
{
if(isMale(name))
{
Employee man = getEmployeeByName(name);
return man.getWeight() > AVERAGE_WEIGHT;
}
else
{
return false;
}
}

Wednesday, November 11, 2009

Fairy Tale

There was once a kingdom in a land far far away, ruled by a wise and noble king.
The king was blessed with two lovely children: A prince who was the most handsome man in the kingdom, and a princess who's beauty was unsurpassed. Under the king's just rule, the kingdom and it's people prospered.

Alas, all good things come to an end. A vicious dragon, accidently freed from the magic spell binding it, began to attack the people of the kingdom. Everyday it would devour an entire village. The terrified people beseeched their king to save them from this menace.

The king made an announcement: he promised the brave soul who slays the dragon the hand of his daugher in marriage. Hearing this, every knight in the kingdom donned his armor and set out towards the forest: for the man who married the princess would truly be the luckiest of men.

One after the other the knights tried to kill the dragon, but none succeeded. The dragon was too savage and strong.

With the death of each knight, the king grew more despondent. At last, when there were no more knights left, a man with an axe stepped forward. "I would like to try to my luck with the dragon, your majesty", he implored. "Are you a knight, my good man?" asked the king, to which he replied "No sire, I am a humble woodcutter". "Very well, you may try.", said the king, without much hope.

The woodcutter didnot recklessly confront the dragon as the knights did. He studied the habits of the dragon for many days. He noticed that the dragon always drank water from a pond, which gave him an idea. He made a special potion from the bark of some trees, which he mixed into the pond, which made the dragon go to sleep. He then cut the large trees around the dragon thus crushing it. The dragon was finally dead.

When he returned to the palace, he was greeted with great applause. The king came to meet him at the doorstep. "You have saved our kingdom, for which I am thankful. As promised, I give you my daughter's hand in marriage". The princess smiled shyly. The woodcutter hesistated for a moment, then whispered something into the king's ear. The king was lost in thought for a minute, then he replied "Very well, if that is what you want, so be it".

The woodcutter and the prince lived happily ever after.

Monday, October 19, 2009

Fairness

James and John were twins, but they were as different as two people could possibly be. John was a doctor who worked tirelessly serving poor people. Every year he gave thousands of dollars to charity. John was also a devout man who had not missed church in 30 years. James on the other hand was a gambler. He had been to jail many times for robbery, selling drugs and destroying property. He used drink every night and beat his wife. He was also an atheist who desecrated churches.

As it often happens with twins, James and John died the same day, James a few moments before John. To John's delight and to James' surprise, they found themselves in front of God, standing in a line. Behind God, there were two paths, one to Heaven, one to Hell.

James was first. He tried to open his mouth to speak, but he was unable to. For a few seconds, James stood meekly in front of the Creator. "Heaven" decided the Lord, and James was carried away by Angels along the heavenly path.

John was surprised by the decision, but he reasoned that God knew all; maybe there was a spark of goodness in his brother. John was happy for James.

Then came John's turn. John stood with his head bowed, humbled by the Almighty. Patiently he waited for his decision. "Hell" replied God, to John's great dismay. As demons came to take him away, he tried to think what wrong he had done to deserve eternal damnation.

As the demons were taking him away, he saw at last how God decided man's fate. God was fair. God was just. God was good.

God tossed a coin.

Monday, October 05, 2009

Infidelity

Who could have guessed that a letter from the department of revenue was what ruined Malini Srinivasan's marriage?

In retrospect, all the classic signs were already there. Srini had been coming home late for the past few weeks. Work, dinner with important clients, deadlines: he had made the usual excuses and she had believed him.

The letter changed everything.

The letter came when Malini was in the kitchen; she did not open it immediately. She was cooking Srini's favorite urundai kozhambu and wanted to get everything ready by 6:00pm. Srini had promised her that he would come home early. At 5:45, exhausted but satisfied with the afternoon's work, she sat down on the sofa and waited for her husband.

He came home at 11:30.

"Sorry dear, already saapaDaama .... Good night" was all he said before going to bed. The perfunctory apology was somehow worse than an insult.

Malini couldn't sleep. Looking for something to occupy her mind, she picked up the letter that had arrived earlier. It was from the Department of Revenue. It was addressed to her husband, but since Malini did all their taxes, she didn't hesitate to open it. As expected it was a property tax receipt.

She was about to file it away, when she saw something strange. The address on the receipt was not of their house. Strange, she thought, the receipt was posted to the correct address.

A seed of doubt was planted; and it grew. Malini started going through his credit card statements: not even one entry was a restaurant. So much for the dinner-with-clients lie. As she went through more statements, she began to understand the extent of her husband's betrayal.

Nobody knew how Malini got a gun, but she did. Two days after the letter, Malini waited for her husband; she would give him one last chance at coming out clean. But he didn't come.

At 7:00pm Malini hailed an auto to the address on the receipt. It was a nondescript house in a shady part of town. Without making a sound, she tried the door; it was unlocked.

The smell! The smell hit her just as she entered the house. It hardened her resolve; she knew what she was about to do was right.

There wasn't much furniture in the hall, just a table and a chair. A recipe book was lying opened on the table. Malini could hear her husband humming from the kitchen. She took out her gun and made her way towards him.

Srini was shocked to see his gentle, loving wife standing there with a gun in her hand. Nervously he glanced towards the vessel on the stove and back at her. "Is that what I think it is?" Malini asked him. He didn't have to answer, the look on his face said it all.

She closed her eyes and shot him.

She made the headlines in the newspaper the next day: "Tamil Brahmin Wife kills husband for eating non-veg food".

Saturday, October 03, 2009

How to escape an Indian wedding

Has this ever happened to you?: You're sitting there, shirtless, with a mangaLasutra in your hand and you suddenly get cold feet. You think of all the western men who leave their brides standing at the altar. But you can't do that because (a) the bride isn't standing (b) there is no easy path from the altar to the door.

It's clear you need a better plan.

Don't underestimate the Indian wedding ceremony: thousands of years have refined it to be almost impossible for a groom to escape. But with the right planning and technology, it can be defeated. And I will teach you how. So pay attention.

Here's a list of things you will need:
  • one half sleeve shirt
  • one pair of jeans
  • Rs 7.50 in exact change
  • 200 grams of Cycle brand saambraNi*
  • two M47 submachine guns
  • two Smith and Wesson .50 handguns
  • thirty hand grenades
  • one auto rickshaw


First, you need to make a map of the wedding hall. A typical wedding hall looks like this:



Here is what you do on the wedding day. Remember, even the smallest mistake can ruin your plan, so learn this by heart.

a) Pretend your leg is itching, reach into your panche and take out the packet of saambraaNi. Put it into the agnikunD. This will cause a lot of smoke, which will hide you taking out the guns.

b) Take one handgun in each hand. With the left gun, shoot the bride, with the other, shoot the poojari. Aim for the head. Show no mercy, they are the enemy. Drop the guns, their work is done.

c) With the machine gun, start shooting people on the dias. There is no need to be accurate. Make your way towards the stairs, but keep shooting.

d) Now you have two choices. I have illustrated both with diagrams. Choose one of them.

Plan A: Turn sharply left. With the left hand shoot at the people on the bride's side. Lob grenades to the groom's side. After you reach the midpoint, switch hands and start lobbing grenades on the bride's side. When you reach the corner, turn sharply right and run to the door. Once you reach the door, lob all the grenades and jump out of the door.


Plan B: Keep walking on the centre aisle, and keep shooting people with both hands. Once you reach the midpoint, turn around, throw the guns and start throwing grenades as you run back. Once you reach the door, lob the last grenade at the musicians.


e) Hurray! you're out. But your work is not yet done. If you get caught now, they'll make you marry the bride's sister.

f) Run towards the auto. You should have parked it facing the road. Rev it up and off you go.

g) Chord Road to Majestic is normally 30 minutes; you need to do it in 10. Avoid Anand Rao Circle, it's congested at this time. While you're driving put on the jeans and shirt.

h) Go to platform 4, catch the 86. If you can't, get into a 265. Avoid the puskpaks, you only have Rs 7.50.

i) Get down at dasarahaLLi. Congratulations, you are home! You've done it!

Note: The same plan, with a few minor modifications, will work for the bride as well. I would suggest a Flame Thrower instead of a machine gun.

* saambraaNi is the resin of the Commiphora wightii tree, which when put on hot coal, produces lots of smoke.

Tuesday, September 22, 2009

Classification of detective stories

Almost all whodunnit stories fall into one of the following story-o-types:

Setup: V is a victim who dies. D is the detective. X, Y, Z ... are the suspects. The killer K must satisfy K ϵ {X, Y , Z ...} U {D, φ, V}.

1. The least obvious suspect did it: This trick is used so often that it has become almost a cliche. Y is meek, good and helpful. Y seems the least likely to have carried out the murder. In the end though, Y is revealed to be the killer.

2. The most obvious suspect did it: As people read more and more novels which use trick #1, they start suspecting such unlikely characters. A clever writer reverses this by making the most obvious suspect the killer. The problem with this is if the reader hasn't come across trick #1 very often, the ending will fall rather flat.

3. The victim did it: No one suspects the victim, by virtue of the victim being dead. The ending reveals that the victim intentionally killed themselves, thus confounding everyone.Cards on the table is a good example of this trick.

4. Everyone did it: People instinctively expect only one of the suspects to be the killer. If more than one suspect were in collusion, the reader is much less likely to deduce the culprits. The most famous example of this is of course Murder on the Orient Express, where every suspect turns out to be the killer.

5. No one did it: There never was a murder: it was all an accident. Like trick #3, the reader feels a bit cheated since the perpetrator isn't brought to justice.

6. The victim is the victim: V is supposed to die, but W dies instead. The ending reveals that W was the intended victim after all. The ABC murders is a perfect example of it.

7. The fake victim did it: This takes trick #6 to one more level; not only is W the intended victim, the fake victim V is the killer. The Mirror crack'd from side to side is a good example of this.

8. The detective did it: This obviously doesn't work if the detective is famous. Also, for this to have a satifying ending, there has to be a second detective who reveals the killer. Bonus points if the story is being narrated from the detective's point-of-view in first person.

9. The butler did it: I just had to put that one there :D

10. Unexpected Motive: Given that the choice for 'who' is pretty limited, the motive is the factor writers get to play most with. Again, The Mirror crack'd from side to side is a brilliant example of a motive for which enough clues exist in the story, yet is very surprising in the end.

11. Unexpected Method: 'How' is the thing writers let their imagination run free over. The most interesting ones are the "impossible murders": murder which happened in a room which was locked from the inside etc.

Monday, September 14, 2009

Handling memory leaks

I found this gem in some code I wrote in 2003. This, ladies and gentlemen, is the proper way to avoid memory errors.

//////////////////////////////////////////////////////////////////////
/// Extremely Dangerous to do this , but the app keeps crashing
//////////////////////////////////////////////////////////////////////
void SigSegVHandler(int __SigNumber){
return;// I am ignoring all Segmentation faults
}
int main(){
signal(SIGSEGV, SigSegVHandler);
}