Monday, April 27, 2009

The Complete Story - The NSS Valedictory Fiasco

Not everything went according to plan at the NSS Valedictory Function on the 25th of April. This is a chronicle of all the events that took place. This is the mail that I sent to the NSS group to explain the effect of their individual choices on the collective whole.

Hello everyone,
For those of you who don't know what has taken place, let me give you a quick summary. For those of you who do, you might have missed some of the following points. Please go through this carefully. 
1. The Chief Guest for the Val function was Dr. Harsh Sinhval, Dean (Alumini Affairs)
2. The Guest of Honour was Dr. Gaurav Raheja - Institute Architect
Both of them had agreed to be present at the Val function at the last moment. They had been invited at around 5 pm the previous day.
The fiascos that took place:
1. Almost no one was present at the venue at the allotted time of 3:15 pm
2. Dr. Sinhval arrived punctually at 3:28 as the time given to him was 3:30 pm
3. 3:28 pm onwards - we push the panic button and start calling up everyone to be present at the Val function
4. 3:43 pm - Dr. Sinhval expresses his anger at the state of events and threatens to leave the function if the event doesn't proceed by 3:45
5. 3:44 pm - We start the event. Dr. Sinhval requests that all the doors to the auditorium be closed to prevent the entry of latecomers
6. We disregard his request. We keep on calling up people. We even request the Dramatics section to fill up the auditorium. They refuse. I call upon personal friends to help me out at this point of time. The NSS activity list is being read out by Shruti.
7. Close to 4:00 pm: Dr. Sinhval is asked to say a few words to the audience. He is furious. Total audience strength: close to 40 people.
A quote from his speech: "Normally, it isn't considered good manners to criticize your hosts but I am compelled to do this today. All the activities that you have read out to me hold no value. Anyone can write anything on a piece of paper and say that we've done this and done that. From an organization of 345 students, is this what is expected? Had I been the head of NSS, I would have clearly stated - those who don't attend this function will have their grades held back."
Just then, someone enters. Dr. Sinhval responds - "Aayiye, Aayiye. Mushaiyare mein tashreef rakhiye. Aakhir yeh mushaira hi hai na, koi function nahin." The entire executive team is looking shamefaced.
At the time of inviting him, Dr. Sinhval had expressed happiness at the work we were doing to teach students. He had asked us about the problems we were facing and had even offered to get a room for Prerna students to be taught at the ABN School on Saturdays. This is what he said then:
"Naga had told me about the problems you were facing in teaching students on weekends. I had thought of helping you in this regard but after what I have seen here today, I shall most certainly not be doing that. This is all that I had to say." He proceeds to his seat.
Can you imagine the plight of all those present there? Katiyar sir on the dias, sitting right next to him. Me and Naga sir down below - looking at the dismal empty chairs of the Civil Audi, desperately hoping that something can still be done, our hearts sinking with a feeling of deep loss. What should we do next? 
8. Dr Raheja states a short story on the work that NSS has done. He maintains a calm disposition, but it is clearly seen that he's disappointed with the state of events. Meanwhile, Katiyar sir is desperately trying to calm Dr. Sinhval. Water arrives for the guests. There was no bouquet for any of them as the flower shops in Roorkee were closed. 
9. Dr. Sinhval realizes our plight and requests the mic to say another story, this time a humourous one to diffuse the tension, but it is obvious that he is still simmering under the surface.
10. Naga sir was asked to announce the new team - Katiyar sir interrupts him and asks him not to do so.
11. The prize distribution for all the active volunteers takes place. Dr. Sinhval's comment: "I hope atleast they are present here". First two names called out are not present. Just to save face, we start sending other people up in case those that were being awarded were not present. Katiyar sir is given a memento for being the NSS Program Coordinator. There are no mementos for the Chief Guest and the Guest of Honour.
12. Prize Distribution over. I come up on stage and try salvaging the situation. I highlight the fact that the NSS Volunteer Awardees have worked close to 100 hours over the course of 2 semesters for a 2 credit course and that the people sitting in the audience aren't the "masses" working for grades, but those that realize the importance of their work and the service they are rendering to the nation, not out of pity, charity or kindness, but out of a feeling that every person in the country deserves as much as his country can give him.
14. I escort the guests down from the stage towards the refreshments. Dr. Sinhval refuses to leave the stage before me (as is his right, being the Chief Guest of the Event). This is an indirect slap to my face.
15. Katiyar Sir and the other Guests chitchat over refreshments but Dr. Sinhval refuses to give an assurance that he will continue to help us in the future.
16. The guests leave.
Let me make a few points here:
1. Why do I make such a big fuss about punctuality?
     a) I realize the value of time. So do others.
     b) This is what happens when you're not punctual. I know this. That's why I care.
2. Who is responsible for this mess?
     a) I am - for leaving the management of critical aspects of such an important event to my juniors.
     b) Naga Sir - for doing the same.
     c) The new executive team - for not taking their responsibilities seriously.
3. Who is not responsible for this mess?
     a) The first yearites - You have done exactly what I had expected you to do. You will prioritize 1 hour of sleeping or lazing around in the name of studying over coming for the val function. 
Don't you think that your seniors might have spent many more hours getting the permission for the Civil audi, tallying the attendance, getting the certificates printed, writing the names of the people, getting the mementos, arranging for refreshments etc? Aren't their examinations on the same days as all of you?
   All you guys had to do was to get up and come over for one hour - one single hour away from your studies too finally see and understand what you have achieved as part of NSS, what other cells had done and why you should be proud of your work and give a farewell to the current team. Of course, most of you weren't interested.
4. Who should bear the brunt of the consequences?
    The NSS Team. They are now entrusted with the task of jumping through administrative hoops and loads of red tape to get permission for the simplest of things. By serving your self interests, you have inadvertently denied NSS a golden opportunity to have better relationships with the administration.
In any case, there is no use crying over spilt milk. You have done what you had to and we did what we could to save face. That's all there is to it. Thanks everyone for a very "memorable" farewell. It affected me to the depths of my heart... really. Thanks a lot...
Divye Kapoor
Ex-Joint Secretary
NSS 

Thursday, April 23, 2009

BUGS in DK's soul

Recently received via fakemail.info:
DK's soul has bugs too!!!! Thats why its in Beta...

Thanks for the obvious creativity guys, you really cracked me up. :-)
The other mails were also fun, but some were unpublishable.

Keep mailing... Love to see your quote of the day in my inbox.

Wednesday, March 11, 2009

Google moving towards the "Google OS"

Google Code Blog: Announcing the Native Client Security Contest

Google is moving slowly but surely towards its much hyped (but never confirmed) "Google OS". Google has just announced the Google Native Client Security Contest which challenges students and professionals from around the globe to have a look at the Google Native Client (or NaCl as it is better known in the docs) to find bugs and vulnerabilities. The person who identifies the maximum number of bugs can receive (in typical Google fashion) upto $ 2^13 . Great chance for all you hackers out there to earn some real m00lah.

However, its not the money that has caught my eye in this contest. The most eye popping thing about this piece of software are the screenshots that show how a full fledged 3D game - Quake, is running right inside of a browser. Its no wonder that Google claims that it will revolutionize the degree of interactivity available inside of a browser. Have a look at the screenshot below:



Another thing that you should consider doing is reading the research paper of the people who built this sandbox. The've gone to great lengths to ensure security of their sandbox by using static code analysis, code flow control and syscall interception. Its really worth your time.

Tuesday, February 24, 2009

GMail has bugs too! That's why it's in Beta.

Check out the image below. A rare bug in the GMail interface.

Sunday, December 21, 2008

My match with Vishwanathan Anand


On the sidelines of the PanIIT Alumini meet being held at IIT Madras, Vishwanathan Anand - World Champion of Chess put in an appearance and played 14 boards of chess in a rapid mode of play. This was the sequence of moves played at table 4 by Narendranath (a 2000ish rated player and captain of the IITM chess team whom I met while playing chess at the InterIIT sports meet held earlier). It was real fun. Have a look.
White: Vishwanathan Anand
Black: Narendranath (IITM)/Divye Kapoor(IITR)

1. e4 c5      ; Sicilian Defense
2. Nf3 Nc6
3. Bb5 a6     ; push the bishop
4. Bxc6 bxc6  ; have a doubled pawn
5. O-O d5     ; try opening the doubled pawn
6. d3 Bg4     ; try pinning the Knight
7. h3 Bh5     ; push back the bishop
8. Nc3 d4     ; push the Knight and block the center
9. Na4 b3     ; Knight threatens entry
10. Bg5 h6    ; Push the Bishop
11. Bxf6 Qxf6 ; Bishop v/s Knight exchange
12. g4 Bg6    ; Break the pin on the Knight
13. Kg2 h5    ; Support the white pawns
14. g5 Qf4    ;
15. Qd2 Qc7   ; Push back the Black Queen
16. Nh4 Bh7   ; Push back the Black Bishop
17. f4 Bd6    ; Develop the Black Bishop
18. Nb2 Kd7   ; Break Black's Castling
19. Nc4 Raf8  ; Bring rooks into play
20. a4 Qb8    ; Start supporting the White Knight at the hole at b6
21. a5

Match abandoned due to lack of time.

Tuesday, November 11, 2008

Is Heysan.com a clickjacking attack, virus dropper or something else?

For those of you who have been regularly using GMail, the recent arrival of unexplained chats from your friends might have piqued your curiosity. A chat lands up in your GMail Inbox claiming to have been sent to you by one of your friends bearing some sort of cheesy one liners and that you should click on the link to view them. Something like this:

Though usually I'm highly suspicious of these sorts of clicks, I went ahead and clicked it. (After all, Firefox, my favourite web browser has quite a decent track record as far as security is concerned).The site that opened up looked like:
Now, I'm not going to be giving up my Google Account password to any site that just asks for it. No Way! Not a Chance! Not even if it boasts of the Google Talk logo. But then, there are all kinds of people in the world and some are likely to enter their Google ids and passwords due to ignorance. In my opinion, this site is a fraud that is directly and obviously obtaining access to userids and passwords of GMail accounts and using them to perpetuate a mass mailing campaign from within the comfortable confines of your GMail inbox. The fact that there exists a hidden link to admob.com (a highly SEOed advert site - see image) by means of a 1px x 1px image, bolsters my gut feeling about this site. Beware all of you who get a link to heysan.com - I think that its just the tip of a very large iceberg. Recent reports of a click based vulnerability in all browsers is a further cause for tension. Be on your toes everyone! More information on clickjacking is available here.

The hidden links on the GTalk page is:
And the heysan.com home page looks like this:
All links on this page lead to login areas of different popular e-mail and IM sites. So beware the casual web surfer: this does not augur well for the web. Currently, the best known safety solution is to install the NoScript addon for Firefox and use it to disable iframes.

Friday, October 10, 2008

Permutations of a string containing duplicates (C++ Version)

Have you ever thought of how to generate and display/print all possible permutations of a string (containing duplicate characters) such that every legal permutation appears atmost once in the final output, without taking a humungous amount of memory to keep track of all the permutations you have generated? This particular function utilizes a cool STL algorithm and generates all possible permutations of a string only once (whether the original string contained duplicates or not).

int dup_permute(char *str, size_t length) {
    int count = 0;
    std::sort(str, str+length);
    do {
        ++count;
        cout <<  str << '\n';
    }
    while(std::next_permutation(str, str+length));
    return count;
}


Of course, since the major work of this function is being done in the C++ standard library, an explanation of the standard library functions is in order.
First up is the std::sort function. Located in the <algorithm> header, true to its name, it sorts the given range of elements (in this case the string, specified by pointers to its first and last elements). std::next_permutation is a tough one to deal with. The working of this function is too convoluted to explain in a couple of sentences, so, I would recommend you look up this reference and this MSDN article. In short, next_permutation generates the next lexicographically ordered permutation of the given elements using no more than a constant amount of extra space. All that work is done using comparison, swapping and reversing a subset of elements in the array itself. Also, since there is no copying involved, this function is blazing fast. So, the next time someone asks for all permutations of a string, forget about recursion and look at this iterative version. Not only is it correct for the distinct elements case, it works even when the string does contain duplicates. If you liked it, don't forget to leave a comment.