Thursday, July 30, 2009

New Versions of Softwares And Services

In 2002, Yahoo had voice chat and SSL. After some time, they removed both the features. After a year or so, they had re-introduced it and publicized as if they are completely new.

Few years back, IBM Lotus Notes Client had many features. In the next major version, they removed many features. In another major version, they introduced those features back, and started giving publicity for the old features as if they are life changing features.

Now, it is the time for Win 7. The main point in many reviews is, "Everything that works in XP will work now".

Monday, July 27, 2009

Economics - Taxes

Suppose that every day, ten men go out for beer and the bill for all ten comes to \$100. If they paid their bill the way we pay our taxes, it would go something like this:

* The first four men (the poorest) would pay nothing.
* The fifth would pay \$1.
* The sixth would pay \$3.
* The seventh would pay \$7.
* The eighth would pay \$12.
* The ninth would pay \$18.
* The tenth man (the richest) would pay \$59.

So, that's what they decided to do. The ten men drank in the bar every day and seemed quite happy with the arrangement, until one day, the owner threw them a curve. "Since you are all such good customers", he said, "I'm going to reduce the cost of your daily beer by \$20". Drinks for the ten now cost just \$80.

The group still wanted to pay their bill the way we pay our taxes so the first four men were unaffected. They would still drink for free. But what about the other six men - the paying customers? How could they divide the \$20 windfall so that everyone would get his "fair share?"

They realized that \$20 divided by six is \$3.33. But if they subtracted that from everybody's share, then the fifth man and the sixth man would each end up being paid to drink his beer. So, the bar owner suggested that it would be fair to reduce each man's bill by roughly the same amount, and he proceeded to work out the amounts each should pay.

And so:

* The fifth man, like the first four, now paid nothing (100% savings).
* The sixth now paid \$2 instead of \$3 (33%savings).
* The seventh now pay \$5 instead of \$7 (28%savings).
* The eighth now paid \$9 instead of \$12 (25% savings).
* The ninth now paid \$14 instead of \$18 (22% savings).
* The tenth now paid \$49 instead of \$59 (16% savings).

Each of the six was better off than before. And the first four continued to drink for free. But once outside the restaurant, the men began to compare their savings. "I only got a dollar out of the \$20," declared the sixth man. He pointed to the tenth man, "but he got \$10!" "Yeah, that's right," exclaimed the fifth man. "I only saved a dollar, too. It's unfair that he got ten times more than I!" "That's true!!" shouted the seventh man. "Why should he get \$10 back when I got only two? The wealthy get all the breaks!" "Wait a minute," yelled the first four men in unison. "We didn't get anything at all. The system exploits the poor!" The nine men surrounded the tenth and beat him up.

The next night the tenth man didn't show up for drinks, so the nine sat down and had beers without him. But when it came time to pay the bill, they discovered something important. They didn't have enough money between all of them for even half of the bill!

And that, boys and girls, journalists and college professors, is how our tax system works. The people who pay the highest taxes get the most benefit from a tax reduction. Tax them too much, attack them for being wealthy, and they just may not show up anymore. In fact, they might start drinking overseas where the atmosphere is somewhat friendlier.

David R. Kamerschen, Ph.D.

Professor of Economics, University of Georgia

Source: http://doc.cat-v.org/economics/bar_stool_economics

Friday, July 24, 2009

Automation Vs Manual - Which one is better?

As a developer, would you like to automate everything? If not, on what criteria would you like to automate?

Few months back, I was asked to automate a task, and I directly rejected it, and I did not automate it.

The task was supposed to be done at max two times. If it is going to be run more than twice, then my Manager's Manager's Manager would become serious, and everyone knew that. Because of that, I assumed that, it would be run at max 6-8 times.

Automating the task would take one week, and manually doing the task would take 2 hours. But, nobody likes to do manual work, so there was pressure from all sides to automate that task. Still, I did not. I told them that, if they cannot do it, then I would be more than happy to do that. Spending 2 days doing manual work is the correct startegy for the project rather than spending 5 days for automating.

Unfortunately, most of the developers do not think like that. They are completely against manual tasks, and ready to spend 10x more time for automated tasks which are not at all required in the first place. The goal of the developers should be to improve the project and not to do something that looks good only in the project document. The real innovation will come up only when people do the best work for the project and not for the self.

Tuesday, July 21, 2009

From an INFOSCION to a POLITICIAN - Nandan's Chronicles - 2

Continuing my tryst with capturing the life and times of Nandan Nilekani in his new avatar as a Cabinet Minister, here is what he had penned after his first day in the Parliament. The last entry stopped when the House was just about to begin. Let’s see what happened thereafter….

The House was in pin drop silence. I was brimming with anticipation and excitement!!!! Manmohan had informed me that my introduction was one of the important points of the agenda. I hoped that I will be able to make my speech properly. After so many interviews and conferences, I was nervous today!!!! After the Speaker indicated that the proceedings of the House could begin, Manmohan formally introduced me to the entire House. He mentioned that as the head of the Unique Identification Authority of India, I was responsible to ensure that each and every Indian had a digital smart card as a proof of his existence.

Manmohan spoke about why I was selected and also some references to the various projects executed by me in Infosys were mentioned. The House listened with rapt attention. I was asked to say a few words and I did exactly the same!!! I thanked the Government of India for having given me this opportunity and I assured the House that I would strive to successfully deliver this project. The Speaker then formally inducted me into the House and before the proceedings could move any forward, there was a small commotion on the other side of the hall.

It was Minister of Textiles who had a comment to make before the next point on the agenda. He made a request that I should be attired in a more austere way instead of a flashy suit. It did not go well with the image of a minister who should live to serve the common man and should be less ostentatious in his habits. I stood up to reply. I offered my apologies to the Honourable Minister and assured that I shall be in a more acceptable dress next time. I felt that he was right. We also used to have corporate dress code in Infosys. So it's here as well!!!!

I sat down and felt somebody nudging me. I turned around and to my surprise; it was the former Indian skipper and one of my favourite batsman Mohd. Azharuddin. I remembered that he had recently won the elections. I smiled at him and mentioned to him that I used to like his game very much, shaking his hand. No Rolex, I noticed. Azhar told me that he would “fix” me an appointment with an Italian designer who had designed his dapper Kurta suit. An Italian designer in Milan doing Kurtas!!!!! I made a note of this and reminded myself to give this example to Friedman for his next book,” The World Markets are flattened”.

Since there was no doubt about the “Fixational” capacities of Azhar, I told him to give me the details and I would consider. The proceedings of the House went on with numerous bills being debated and passed as I sat as a passive audience waiting for my project’s turn to come up. After the lunch break, it was the moment for me!!!!

MY PROJECT”S FIRST REVIEW CAME UP FOR PRESENTATION.

I was at sea. My laptop did not have any reserve power. I went to Manmohan and apprised him of the situation. I was sweating. He calmly replied that this would not be a cause of concern. I was flummoxed!!!! The Speaker asked me to explain to the House on what were my plans for the Unique Identity Project. I replied that I have a plan prepared for 30-60-90-120 days’ milestones and I have presentation to make for which I need a power socket, a projector and a screen. I had no idea what was going to happen after this.

The next couple of minutes were a complete jolt for me. I was completely in a tizzy. Let me just summarize what happened. A Joint Cabinet Secretary Committee was set up to judge the feasibility of my request. The Under Secretaries for the Ministries of Power, IT and Broadcasting will prepare a Viability Report after scrutinizing National Security threats to my request. This was because the power socket comes under Power, laptop comes under IT and projector comes under Broadcasting. I have also been told to reconsider my timelines of 30-60-90 days and start thinking in terms of years. Probably, they are right. I did not have the foresight in this matter.

The summary of the issue is that I need to come up with a more inclusive, democratic, comprehensive long term plan for this project to be executed over the next five years. I have also been given a presentation slot 3 months from now (by which the issues related to the power cord etc will also be resolved). I am filled with mixed reactions. I was planning for a quick resolution; the management wants a strategic solution. I came out of the House and texted Murthy.

"You won’t believe it but these guys work just like us. I am on a NATIONAL BENCH for the next three months!!!!!!!!"

This is a fiction. I came to know this as fiction mainly due to following points and Google confirmed it.

Nilekani has Cabinet Minister's rank. It does not mean, he is a Cabinet Minister. For example, L.K.Advani (Leader of Chief Opposition) also has a Cabinet Minister rank. It does not mean, he is a Cabinet Minister.

I don't think Nilekani can sit in Parliament with MPs, since he is neither an MP nor a Cabinet Minister.

All the people who have Cabinet Minister rank have more than enough work to do. It is just that, those people chose to stay on bench instead of working.

Using a projector in the Parliament itself very strange.

Update: I got this one on 21st July 2009, and Nilekani took responsibilities on 22nd July 2009.

Monday, July 20, 2009

Java and C#

If anyone wants to become a good programmer, then I highly recommend them to learn Java.

Two features that I like most in Java were Exceptions and All functions are Virtual Functions. Incidentally, When I was learning Java, the only feature that I hated was Exceptions. I understood virtual functions only 6 years after learning OOPS (Object oriented Programming and Systems). But, after understanding, I liked it very much.

Microsoft says, making all functions as virtual functions is limiting the developer's freedom. So, they have come up with all possible functions like new, override and virtual. They say, because, they have more no.of features, it gives more freedom. But, in these things, I would say, it gives more options to do suicide.

If we have many classes with may levels of inheritance, and if we use more than one type of function, then the code becomes highly unmaintainable. Giving more options in this case is nothing but giving more options for suicide.

In Java, you never need to worry about Time Zones. Whenever you get a Date, timezone is in built in the date, and we don't need to bother about it. Whether you are calling new Date() in IST or GMT or PST, it does not matter. It is the same date, and the only difference is it is displayed in different formats. But, underlying object would be same. This is the behavior in Java atleast since 2001. I believe it is the same since the beginning of Java, but, I have not worked with Java before 2001.

A free software (which became open sourced later) that was released in 2001 has a good feature, and I expected that the software developed by the biggest software company in the world released in 2008 will have that feature. With that assumption in 2009, in a meeting room, I almost argued with everyone in the team about that. But, later I realized that, I was the fool in that meeting, and my expectations were too high on the biggest software company in the world.

Few days back, I wrote a C# program and asked one of my colleague to review it. The program is something like below.

`string q = "some string around 300 bytes";foreach(object o in someKindOflist.Items) {    // Do something with o;}`

I was asked to modify it like below.
`if(someKindOflist.Items > 0) {    string q = "some string around 300 bytes";    foreach(object o in someKindOflist.Items)     {        // Do something with o;    }}`

The reason was the garbage collection in .NET is bad, and creating one string is very expensive. So, we should try to avoid these things as much as possible.

Even in 2003, when I was using Java, I did not bother about these silly things. But, in 2009, in C#, I had to write crappy code, just because underlying framework is bad.

In that code, it has very trivial operations and one very simple query. The method will not take any significant time. Any reasonable good Garbage Collection Algorithm should clear it without any problem. But, if .NET does not do it, I don't know what to say about it.

Friday, July 17, 2009

Visual Studio Vs Eclipse

In Eclipse, the usages of variables and methods are highlighted just by placing the cursor on the variable or method.

In Visual Studio, it cannot be done, and that's why all the reviewers force me to use variables like secondaryPartitionIndex instead of i or j in loops, eventhough the loop does not contain more than one or two lines of code.

I am forced to change my coding style, just because of this stupid IDE which costs more than Rs.1,25,000 that got released in 2008 does not support features provided by an open source software that was released in 2004 for free.

If I am working with multiple files in Eclipse, it always keeps the last n files that I have accessed.

In visual studio, it always keeps the recent n files that I opened.

Let's assume, n=2. I am working with file A. Then I opened file B. Again, came back to File A. Now, I opened file C. At this time, file A would be removed, and only files C and B are visible. To access A, I have to again open it from Solution Explorer.

In a typical development cycle, developer would be working primarily on one or two files, and then refer many other files. With this, users would be forced to open those files again and again, eventhough, they are spending significant amount of time on those files.

If any master of Visual Studio reads this, then I am sure, they will give answer like below.

Press Ctrl + Q, Ctrl + \, and then you will get a dialog box. In that Select ABC -> XYZ -> DEF -> QWE. There uncheck the checkbox PTR. After that, this feature will work similar to eclipse.

Formatting of a selected text in Visual Studio is Ctrl+K, Ctrl+F, and one cannot find it from Visual Studio. You have to Google it to find the shortcut. People from Microsoft ask to Bing it. If you don't find proper results, then they ask you to change the country to United States and try it (even if you are in India).

Tuesday, July 14, 2009

Exam based on twenty twenty format!

Cricket has reached exciting levels with the introduction of twenty twenty ... Infusing the same thing into exams, some suggestions:-

1. Reduce exam duration to 1 hr and marks to 50.

2. Introduce strategic break after 30 minutes.

3. Give free hit, that is a chance for students to frame their own questions and write answers.

4. First 15 minutes power play, that is no invigilator in the exam hall. (Wow…!!! I will love this....!)

5. Introduce fair play awards.

6. Cheer girls to cheer for every correct answer written!

Source: Funtoosh

Saturday, July 11, 2009

Later, I realized that, using twitter for my gmail status is better, and I also started using my account http://www.twitter.com/tnsatish.

One bad thing about twitter is, the reply messages. There is nothing like discussion on a topic at one place. Person A says something in his/her account. Few friends of A reply to that message in their account. Let's call this friends as Set B. Let's assume B do not have any common friends with A. Now, all the friends of B have to read a message which they cannot understand. Now, A replies to those messages, and all the friends of A have to read which they cannot understand. This continues and they make a big conversation using twitter.

Of course, this can be considered as incorrect use of twitter. But, if I cannot understand 70% of the messages, then what is the use of using twitter in the first place? Is it Just for reading the remaining 30% messages??

Wednesday, July 08, 2009

Optical Illusion - Blue and Green Spirals

Incredibly, the blue and the green spirals are the same color.

The orange stripes go through the "green" spiral but not the "blue" one. So without us even knowing it, our brains compare that spiral to the orange stripes, forcing it to think the spiral is green. The magenta stripes make the other part of the spiral look blue, even though they are exactly the same color.

Friday, July 03, 2009

What does it take to Convince a Manager?

What does it take to convince a manager that Flight is better than Bullock Cart?

10 Presentations over 20 days each with 25 slides and each presentation is accompanied by 50 pages documentation.

If a manager asks how do you go by flight from here to your home in Mumbai, then most of the people tend to give answer like this.

• Get a taxi to airport
• Take a ticket to Mumbai and board the flight.
• Get down at Mumbai airport and take another taxi to home.

But, if anyone answers like this, then the Manager would give the following feedback.

Where is the doc for procedure to go to mumbai? Is this the doc? How can you expect me to have these three points as the doc? How can you expect me to give this to others? This document is not usable. You have to learn writing proper documentation. You should not be like this. You should learn process. Let me talk to your Career Advisor.