Archive for May, 2006

Convert byte[] to long in Java

May 23rd, 2006 by Shiva | Comments | Filed in Development

One more little thing that is painfully difficult to do in Java. (I love Java though ;) )
There are two ways of getting it done.

a. Cryptic but sweet! bring on the bit manipulators!

private long getLong(byte[] mbytes) {
long lValue =0;
for (int i : mbytes.length) {
lValue = (lValue< <8) | (mbytes[i] & 0xff);
}
return lValue;
}

b. painfully slow and created a gazzillon objects (sooo typically Java)
write byte array to DataOutputStream, and read from corresponding input stream using readLong()

The “Da Vinci” Debacle!

May 18th, 2006 by Shiva | Comments | Filed in Reviews

Check out the news item!! The height of hypocrisy! When there a thousand things we can raise hue and cry over, all we can manage is go on a hunger strike to avoid screening a movie?!! We got to be better than this.. someone please tell me .. we got to be better than this!
Top News | Reuters.co.in

Integrated solutions for an easier life

May 17th, 2006 by Shiva | Comments | Filed in Random Thoughts

The ability to put together a set of innovations into real-life use and build something that reaches the lives of common men, making it a tad easier, a tad more fun .. that I think is the most amazing ability that a person can have. We were discuss this among many other, at office the other day, when we decided to go to a movie.

Now, I have this habit of watching a movie at “Satyam” - chennai’s very own sofisticated multiplex. Aparently, they have a website through which you can book tickets. It is one of the few usable flash based sites, that I have seen. What was amazing for me was that, they also have an option for you to choose the snacks that you would like to eat when you are there!! Kewl uhh?!!

Well, all you need to do is book the tickets, choose the grub that you wanna munch on, and use a credit-card. You can collect your tickets at a counter at the movie hall. During interval, your grub will be delivered to your seat!! Now that’s what I call personalised Integrated Services!!

SFO bridge stats

May 10th, 2006 by Shiva | Comments | Filed in Random Thoughts

I was always intrigued and amazed by the ability of human beings to give up their lives at some of the most beautifiul places. Why do people like to jump of cliffs that provide a breathtaking view, or bridges like the one at SFO with its capability to produce “suddenly-surreal” images!

Check out some statistics on the suicides at the SFO gate
SF Gate: Multimedia (image)