Monday, April 30, 2007
Saturday, April 28, 2007
Winners and Losers of the world cup 2007
The best is always the one but winners can be many. The three winners and three losers of the World Cup 2007 are:
# Three Winners:
1. Australia - They are leaps and bounds ahead of the second best team. They show how cricket should be played.
2. Sri Lanka - They truly are the second best team. The body language and the spirit of fight demonstrated by this team is unparalleled.
3. Bangladesh - They have barged in the league with some emphatic passion.
# Three Losers:
1. Pakistan - With open religious overtures and inside betting scandals, they have hurt the game of Cricket as has never been seen before.
2. India - The less said the better.
3. South Africa - The team with brilliance does not know how to make a kill when it needs to be. The best chance they had in the recent times was spoiled by some over confidence and panic.
Posted by Ashish at 2:25 PM 0 comments
Friday, April 27, 2007
A Positive No
#Phase-I
About six months ago I worked on a Proof of Concept for one wonderful Client. The task was to prove that some of the processes can be automated. Even the task was pretty straight forward but it was a critical component for the customer. We identified 5 or 6 elements to implement. As the assignment was for two weeks and the scope was PoC, we did not build all the functionalities of the product. It was an agreed upon scope. Driven by the success of this application the customer went ahead and purchased the entire suite and are in process of EOL'ng their old system. The client wanted to add a couple of new functionalities to have and they contacted our department to send me back in for some reasons including my integrity and familiarity with the application. I appreciated their faith.
#Phase II
The owner of the application had changed since. I was invited to give my assessment on the effort required for the new functionalities. As the application was built as a PoC, I suggested not to deploy the application as is, and gave close to 4 weeks of effort to re-build/re-factor the application to make it production deployable. It was not we will do it in 4 weeks but whoever should do it should expect the same. "It was a good speech but if we need to expand the application we will do the rest in-house. We just need you to add the two new functionalities in the existing code" was the response of the new Client manager. We got 10 days. I scoped the work and sent our assumptions of the test environment. The new developer from the client had entirely different view of what functionalities the application should have. I agreed with him. Even though we were already under tight schedule, we re-factored the code to make it more scalable. We delivered the application. Our intentions were good.
#Phase III
A chain of emails started... Nothing is working. I was with another client now. I tried to understand his "Nothing". After a week of emails the client figures out that they did not create the test data right and were passing wrong arguments. I felt bad for them even though we had engaged the team which we did the PoC with and the knowledge transfer should have happened on their side. My engagement was over but we got another email to add few more functionalities. I was not available, it was out of scope and I remembered the words "If we need it we will do it...". Another email thread started, how everything was working but one piece. After finishing up my 10 hrs with my client, I stole hrs at the hotel to work on his problems. Our intentions were good.
#Phase IV - The Positive No
I got a very fiery email from the developer (not his manager). "We are working on this problem but what about the other functionalities we want to add? When are you going to deliver that? We hired you to complete the application". He had crossed the line. I was reading "The Power Of A Positive No" by William Ury then. That was it. He tried to push me to the edge. I had to take my Plan-B. I engaged my Manager. He is one of the exceptional pro-active Manager's I have ever seen. He engaged the customer, and the sales manager of the product. I think he did his job as I got an email from the same developer - "We have completed the rest of the functionalities ourselves. We don't need your assistance no more". Awesome! Even though the tune of the email was not polite, thats what I wanted to hear from them from the very beginning. The customer had to take the ownership and need to build the expertise in-house if "They wanted to do what they needed, themselves". Driven by my Positive No I was happy to see my Customer stand on their own feet. Not sure what perspective they have. Our intentions were still good.
Posted by Ashish at 2:55 PM 0 comments
Monday, April 23, 2007
My replies to Google's riddles
My blog clicks took me to KSquared website. Even though it is highly unlikely that Google will ever offer me a job (Their search is not that sophisticated yet ;)) but I think here would have been my replies:
Q: "You are shrunk to the height of a nickel and your mass is proportionally reduced so as to maintain your original density. You are then thrown into an empty glass blender. The blades will start moving in 60 seconds. What do you do?"
A: With all my density I will scream so loud that the person who is about to push the start button will think the blender is about to explode. Surely he will check it before he starts and if I continue screaming even when the container is not hooked, its anybody' guess what he will do.
Q: "Explain a database in three sentences to your eight-year-old nephew."
A: Database is like your Mom who keeps arranging your Clothes and Toys so that you can find them easily when you need them.
Q: "How many gas stations would you say there are in the United States?"
A: Add up the high density states which in total would be 600000 sq miles. On an average you would see 500 cars per sq miles. That means at one point of time there are 300000000 cars on road. On average an automobile tank is 15 gallons. So the total gas needed would be 450000000 gallons. On an average one gas station gets 200 customers and each fills in 10 gallons. Then on a single day, one gas station sells 2000 gallons of gas. To serve those many cars, there has to be around 450000000/2000 = 225000 gas stations.
Q: "How would you find out if a machine's stack grows up or down in memory?"
A: Use JMX and instrument it.
So anyone from Google listening?
Posted by Ashish at 4:52 PM 0 comments
Saturday, April 21, 2007
My earnings with adsense
I had registered my ezSaid with Google Adsense. A good service with a hope of extra earnings. So after a few months I log in to my account and see a mighty 3cents earnings in total. May be it did not even come from someone clicking the ads but donated by Google to make my account look good ;). Then I thought what it is worth and what can be done with it? I went to a currency conversion website and found that 0.03$ amounts to over 6 SDD which is the Sudanese Dinar. I think 6 sudanese dinars should be good enough for one loaf of bread, won't it? Am I turning socialist now? My clicks took me to sites describing the situation in Darfur. I can't believe what the countries whose people throw away all their cents on streets can do and not doing enough. These cents I guess can't stop the war but sure can fill a child's stomach for a meal. So thank you whoever and however I got the 3cents from.
Posted by Ashish at 1:31 PM 0 comments
Friday, April 20, 2007
Simple little things in programming - Part 1
No I am not a guru and have no jurisdiction to teach good programming skills and patterns. But its a good practice to keep the code clean and provide room for scalability. I have seen failed but very well written codes as well as very successful but piece of $%!^. Don't use badly written code as a tool for the job security. I think I should start some simple little things in Java programming which is not too much to do but adds to the quality. This sequence is in no effort to discuss complex pattern, or may be later. Your comments are most welcome.
# Use of Reflection to eliminate if-then-else:
==============================================
If-then-else is one of the very basic and one of the most powerful syntax provided by the programming languages. Its also a source of unmanageable, lengthy and cumbersome codes. Most of the patterns defined in GoF and beyond try to address the If-Then-Else world. Java Reflection on the other hand is one of the building blocks of most of the patterns. It provides a very strong set of APIs which can make your code very scalable and easy to maintain. Lets take an example:
# Sample(1):
ReturnType rT = null;
if (condition1) {
rT = callMethod1 (param1, param2);
} else if (condition2) {
rT = callMethod2 (param1, param3);
} else {
rT = callMethod3 (param3);
}
The callMethodX () takes different set of parameters but either returns the same Object or something which can be made more generic. In most cases, the params are owned by the same class. Even though these params have different scopes but together they form one logical set. The problem with the above code is it is not scalable. The invoker has a strong dependency on these call methods. New call methods can be added but they can not be used unless the section of invoker is updated. Lets take another sample:
# Sample(2):
import java.lang.reflect.Method;
public class ClassName {
..
public ReturnType invoker (param1, param2, param3) { // -- scope can change
Object [] inputs = {param1, param2, param3};
Class [] params = new Class [3];
parmas [0] = String.class;
params [1] = Boolean.class;
params [2] = String.class;
ClassName theClass = new ClassName ();
Class thisClass = theClass.getClass ();
// -- put some standardization to the namings
// -- derive the "call" + methodName from the condition.
Method method = thisClass.getMethod ("call" + methodName, params);
ReturnType rT = (ReturnType) method.invoke (theClass, inputs);
return rT;
}
The Sample(2) disconnects the need for the invoker () method to know anything about whats its invoking. Clean yeah? So the code has become a little rich by a simple standard driven method nomenclature. A full blown command pattern will take it to the new heights. Will talk about it later.
Posted by Ashish at 12:04 PM 0 comments
Labels: if-then-else, java, programming, simple little things of programming
Fairwell to Lara
Lara announced his retirement today from all form of international cricket. He will for sure be remembered as a Legend of Cricket. The timing was perfect as West Indies now need some fresh blood to lead. The record of unbreakable 400 test inning runs will always keep Lara alive in the cricket records book. Even though he failed to pull a good chance of winning the 2007 world cup in his home soil, but his legacy is too strong to be forgotten. Interestingly there were so many retirements announced from the teams who remained unimpressive in this world cup. Inzamam, Lara and Kumble to name a few. Even though I was expecting a few more "should bes" from the last Indian team but what else would you expect from a team full of shameless clowns? Some folks just don't understand the decency in retirement. Anyways, Saludo to Mr Brian Lara for all his contributions to the game of cricket. I hope he will continue to inspire others in his innings and his retirement.
Posted by Ashish at 1:40 AM 0 comments
Saturday, April 14, 2007
Pe[a]k-a-boo
India Peaked in the pre-worldcup practice session.
South Africa peaked in Qualifying round.
Australia does not have to peak. They only raise their game.
Sri Lanka and NewZealand peaked in Super-8 and,
Bangladesh only peeks in often.
Posted by Ashish at 11:29 AM 0 comments
Tuesday, April 10, 2007
Will Prabhat respond to me?
While randomly searching on Google, I found the email address of Dr. Prabhat Ranjan a UC Berkeley alumni who also figured in my fav five list. I worked with him a number of years back and who also mentored me on my first project of my first job (Yes in Java1.0). Even though I never told him so but I admired him to the tip of my nails. He was my first "wow - what a person" guy. He is now a Professor in a technology institute in India and I guess spreading the Linux culture in schools. I still remember him working with 30 diskettes of Linux and updating Linux kernel and doing I don't know what. It was the time when there was no gnome and no Ubuntu and me just out of the school. May be it was his Berkeley background for his love for Unix. He was my first Linux guy. So I sent him an email today asking if he still remembers me. I expect a response but yet to see if it will be "Oh yes!" or "Oh yeah I think I remember you". Good stuff.
Posted by Ashish at 2:59 PM 2 comments
Friday, April 06, 2007
The Sanjaya effect
So people are bashing him, doing weird protests, cursing Howard Stern and made the mean Simon a darling of the audience. The reasons given for Sanjaya's success is even funnier:
1. Indians are voting for him in mass: He is half Italian too so could there be Italian mafia behind it? Indians don't even go to vote for their political leaders, I don't understand why would they vote for Sanjaya in mass. BTW, I only voted twice - First for Sundance Head and the second for Melinda Doolittle and I don't see any Indian in them. Look at me (->), I am.
2. Call center employees in India are making phoney calls: The number of call center employees should only be in a few thousand. Was Cricket World Cup debacle not enough to keep them occupied?
3. Its Howard again - the evil: Around 33 million people voted for American Idol which is 10 times more than the total audience base of Sirius. Don't blame him. Ask your neighbor who listens Howard Stern and see if he voted?
4. He is worst of all: No he isn't. Remember what Tony Bennett said about him? He dares to be different. He does not challenge the judges he challenges himself, A pretty rare quality for an entertainer. I don't think he is the best (C'mon Melinda is left) but if he was the worst then he would have been in the last three. He was not.
5. He doesn't deserve to be there: Every single one of them deserve to be there who qualified
Leave him alone and enjoy the show.
Posted by Ashish at 4:16 AM 3 comments
Thursday, April 05, 2007
Yes this is a public document...
So whats a public document? Do you have to make an official announcement or leaving it in an insecure place makes it a public document? Even these scenarios makes it one:
1. Did not announce it but the document is accessible via http://server/...
2. The person with administrative authority talks about it or blogs it.
3. Accessible via ftp://server/pub/... and if all it requires is anonymous login.
4. A link is clicked and it challenges with a trivial login like guest/guest with no warning messages. If it is not easy to ascertain that its a private property then easy logins are like a door knob which is not locked and can be opened by twisting it. Like, http://server/whitepapers or http://server/announcements/ or http://server/docs. Neither the whitepapers, announcements nor the docs has an intent of being private.
5. If test or development servers with internal documents are externally accessible.
6. Google cached documents.
7. If the links are found on a search engine and not passed on by a human.
8. If the document is found with no "return to the company if found" message. Beat the employees then.
9. Sent to a wrong address.
10. Announce it in a all-hands and the employees passed it on. Get them sign a privacy protection document.
Posted by Ashish at 3:15 PM 0 comments
Afraid of EJB?
A good book on EJB3: http://www.amazon.com/Ejb-3-Action-Debu-Panda/dp/1933988347 The same on e-book is $22.50 on http://www.manning.com/panda/. A good read.
Posted by Ashish at 2:05 PM 0 comments
Monday, April 02, 2007
Its my blood
"Its my blood flowing in your veins..." - A typical bollywood statement. Now they have to eat their words because.... The scientists have found a new enzyme which can convert A, B and AB to O(-ve) which then can be transfused to any patient.
Posted by Ashish at 12:48 PM 0 comments