Tuesday, October 30, 2007

Earthquake shake

Had just given the credit card to the waiter and finished my dinner when the building shook. Two seconds later every one realized it was an earthquake and we all ran out of the building. A few minutes later it was all good. A few laughs and drove back to hotel.

Monday, October 29, 2007

And I swung again

Whenever I watch McCain speak I feel he has a good chance of winning the next presidential race. Obama is not doing so well, even though he is still the smartest out there. Hillary is just one mistake away but McCain has shown extremely articulated ethics and commitment to his principles. We have already seen down and out candidates winning the primaries before. With some military gains in Iraq this country can still live with a committed republican in the office. Whadya think?

Sunday, October 28, 2007

Sleep on the couch but don't buy Serta

I bought a Serta mattress about four months ago and paid $400+. Just with in these four months the bed has developed bowing in the middle and that too with a 150lb person who sleeps on that bed only two nights a week. What a waste of money. As ofcourse my 30-day return policy has expired, all I can do with it is throw it in the guest room. Buying Serta was a waste when I saw so many a little bit more pricier Sealys. So I would rather prefer to sleep on the couch than to ever consider Serta again. If still any sane Serta employee reads this please remind yourself what a customer satisfaction means.

Friday, October 26, 2007

Prime number game

I was asked to prove (n2 - 1) will always be divisible by 24 where n being a prime number greater or equal to 5. Here you go: A prime number will always be an (even number + 1) or an (even number - 1). The even number can be replaced with 2*x and the number becomes: (2*x + 1) or (2*x - 1). For n greater than 5, x > 3 and the formula will now be (6*x + 1) or, (6*x - 1) [Not the same x though]. Lets go back to the original question and replace (n2 - 1):

#For (6x + 1) -
((6x + 1)2 - 1) = (36x2 + 12x + 1 -1) = 12x(3x + 1). For any number 'x' either x or (3x+1) will be even. This means no matter what x(3x + 1) is, it will be equal to 2*M where M could be any number. So, (n2 - 1) now becomes 24*M which is always divisible by 24.

# For (6x - 1) -
((6x-1)2 -1) = (36x2 - 12x + 1 - 1) = 12x(3x-1). Same thing again, for any 'x' either x or (3x - 1) will be an even number and 12x(3x - 1) = 24*L where L could be any whole number. Either way, the number is still divisible by 24.

Sunday, October 21, 2007

Need to integrate your applications? Collapse the stack!

Each technology addresses a specific set of problems. It is common to see various functional overlaps in these solutions. In the integration world it is even more messy. Ooh Ooh Ooh! MoM, JMS, ESB, Adapters, BPEL the jargons keeps on growing. Each vertical stack adds further complexities. In many cases it may make sense, in many other it does not. Ask a few questions? Do you really have to XMLify all your conversations? Are your applications all Java, .NET or a mix? Are you overkilling the solution and performance for no specific gains?
Let me take a popular and a simple business scenario. You have a web-site and you sell your products. A user starts a shopping cart, adds some items in it and checks out. Expects a delivery and may be some contract. Now, we have three systems here, your Web-app, your quote approval and the contract system. A Quote is not very different from a shopping cart. A Contract is not very different from a Quote. That means an object which represents a Shopping cart can be mutated to a quote and then to a contract object. Now the fun part - Integration!
Instead of building a huge vertical stack of solutions, deploy Oracle coherence. Configure a Partitioned cache topology on some cheap commodity hardware. Configure 50-60 JVMs (depends on the volume to be supported) to be the nodes of your grid. Now, create three distributed Caches - Cart, Quote and Contract. Attach MapListeners on the cache your specific application will be interested in. In our example, the quoting system would be interested in the checked out shopping cart. The quote system can read this cart, apply a set of business rules and converts it to a quote. After the quote has been verified and created, the quote system can put it in the Quote Cache. The contract system does the same. Reads the quote from the Quote Cache, mutates it to a Contract. It can then put the contract in its database (Write-Behind at Close of Business day). Add the contract object in the Contract Cache for other systems to use. Any worries yet?
What if not all the systems exist in one reliable network? Do you have a .NET application sitting some place working on your objects? Use Coherence*Extend whenever you have WAN or any unreliable network. Use Portable Object Format if you worry about the serializations. Try to get rid of XML communication as long as you are okay to distribute the same application libraries. Keep your system management team lean. Take a hard look and find why this simplification won't work for you? Don't burn yourself writing XML Schema for each system. Collapse your fat stack.

Either I need a long vacation or ..

Last week I got another email telling one of my friends has left his full-time travel job, taking some time off and joining a local company. This was the fifth such email in past some 8 months. I love my company and I love traveling, it has its perks. But the travel is good when you have a home base. You go, travel, help your clients and come back and continue your job. You have one context to work on. It has been a lot of context switching for me lately. Not so physical but it is mentally tiring. It has been so that I seriously am considering retirement, marriage, buying a yacht, taking a long vacation, becoming manager, starting my own business, franchising or something different from what I am doing. When you find every next person happier than you are, it is time to rethink about what you wanna do.

Saturday, October 20, 2007

Fantastic service...

Internet has become a strong communication channel between me and my family in India. These are the festive seasons and it has been days since I had chatted with my family on a webcam and I really wanted to. It has been two days now since the connection back home is down. I called home and found out that "they" do it deliberately so that when they fix it later can get the holiday appreciation money. "They" are the telephone linemen who deliberately disable/plug-off the connections they manage so that they can ask for "tips" when they come home and fix it. The concept is the same here when you are supposed to leave some "holiday money" in your mailbox for your mailman during Christmas. But keeping the service hostage? And if thats true, what a frustrating service!

Sharing the cricketing honors

India ended the Aussie series with an emphatic win in the only T20 match they played. Even though Aussies trounced India with a 4-2 victory in the longer version of the game but I feel the honors were equally shared later with India winning 1-0 in its' shorter version. India even came very close to make the series 3-3 before the middle order had scrambled the advantage its openers provided in the 6th game of the series. But they did come together and won the last two games they played. Its surprising to see Indian team enjoying the shorter version of the game without Sachin, Ganguly and Dravid. Had Dravid been any closer to his abilities the result could have been even better in the 50 overs game. Good to see Gambhir continuing his form. Surprisingly no body talked about Dhoni's six off Brett Lee's first ball of his last over and sealing the game off. That was a good end to a gruiling series for both the teams.

Friday, October 19, 2007

Recipe for survival for GM/Ford/Chrysler

#Ford:
1. Launch a Hybrid for Mustang
2. Keep Mustang/GT, Taurus, Fx50 and Explorer. Retire the rest.
3. Offload Jag and Rover.
4. Strengthen Volvo further.

#Chrysler:
I don't understand why should this company struggle?
1. Keep the technology coming from the Merc's.
2. Push the HEMI and the Charger further
3. Cut gazillion models of Jeep. Keep the existing models and improve upon it.
4. Don't launch too many models. Do not confuse the customers.
5. Get the new Diesel engine.
6. Start a compact hybrid.

#GM:
1. Continue on heavy machinaries.
2. Pontiac needs an extra push.
3. Launch something soon on the Hybrid research your labs have been doing.

Friday, October 12, 2007

Nahane ka kya?

Zagua 神谕

Monday, October 01, 2007

The news from the past week

1. Britney loses the custody - Thanks Kevin the super jerk and play safe manipulator for destroying a perfect life.
2. Handcuffed Mom's death - Airlines can get to your nerves. They behave as if they are doing us a favor for letting us in. I can perfectly see the reasons for Mrs. Gotbaum agitation. Some can control it and some cannot and its important to handle these "agitating-reason-driven-reactions" in more humane way. To maintain calm at that airport gate should have been less important than to make sure a life could be saved.
3. Putin for PM - A weird concept indeed but let the people of Russia decide.
4. Unrest in Burma - Where are the champions of democracy now?
5. Outcry on McCain's Christian comment - Isn't that true? And how come is this truth derogatory to any other religion practiced here? US may not be a Christian nation but its' constitution is certainly influenced by the teachings of Christianity same as Saudi Arabia being built on top of the human dignity as described in Islam. And thats even an official Islamic nation. Stop whining.