Sunday, August 19, 2007

Iam just back from a 2-week trip to Mumbai to help one of our projects, the phase 1 of which was scheduled to go live shortly. My services were specifically requested as the people there felt that my expertise and experience might come in handy. I however had my reservations because the phase 1 of the project involved only minor development which they could have handled themselves. It was only after I was told that I could use my time to work on phase 2 did I agree to visiting Mumbai. Little did I realize what an unforgettable experience I was about to have. I was hoping the team there would be friendly and great to work with. They were friendly alright, about as friendly as a room full of rattlesnakes. They somehow saw my presence there as a threat and were unwilling to treat me as one amongst them. No matter how hard I tried to make friends, they were unwilling to reach out. So in the end I had to cut short my trip and return much earlier than earlier planned. It was only the time I spent outside of office and away from the cut-throat corporate world that made the trip somewhat worthwhile.

Thursday, August 02, 2007

I have just finished reading the book "The Google story" by David A. Vise and boy what a fascinating read it was. I certainly didn't expect the story of 2 stanford graduates who made it big to be this good a literary work. Kudos to the author for crafting this work and providing an insight into the birth and maturing of the world's best search engine.
The journey starts with the characters being introduced and the meeting of Larry and Sergey at Stanford and the sequence of events that followed. Larry is the first to come up with the idea of building a search engine and Sergey helps refine it with his mathematical prowess. The two then seek funding for their project, get the necessary funding, drop out of Stanford and are on their way. Who would not provide funding for such a project if they had the money especially in the peak of the dot com bubble. o much is being said about there not being money involved in search. Yahoo and microsoft think of search as not being primary areas of focus for them. For a large part of the nineties, internet users had to be content with the likes of Altavista, Excite, Looksmart, Lycos, yahoo and a host of other search engines none of which were good. Altavista in fact is mentioned by Bill Gates in his book "The road ahead". Altavista and to an extent yahoo were in fact undermining the usefulness of search by offering paid placements in their search results. Yahoos method of indexing sites by category was not liked by many, me being one of them that disliked it. All this was brought to an end with Google's amazing 'PageRank' algorithm that ranks search results on their importance.
E-commerce had already laid its roots and it was only obvious that merchants would have flocked to have their sites advertised on Google. If google did not have an advertising mechanism in place, they needn't have feared since Altavista already had one notwithstanding their eye always being on the cash register. The cinderella story continues as the company's IPO is a money spinner and their advertising picks up momentum so much so that they have begun to be seen as a big threat by the likes of Microsoft. Nearly all of google's revenue comes from the ads they display alongside the search results. In that respect, they are a 'one trick pony' in the words of the author himself. Any disruption in this ad displaying would result in immediate losses to Google which the author does not fail to highlight. All somebody has to do is launch a slew of search websites, all of which use the same search engine, possibly even google's, and provide the facility to advertisers to advertise their products alongside search results just like Google. This way, Google would no longer have the monopoly that it now enjoys. Having said that, it would really take some serious work to beat google at their own game especially since by now they would have refined their search engine and know all the tricks of the search engine trade and thus have a headstart over anyone else. But still, thats something Microsoft would consider worth exploring. There's no mention of Google maps in the book but that's probably because it was still on the drawing board then.
On the down side, the book is infectious and reading about all that money rubs on you a little bit. Especially if you are a wannabe entrepreneur like me. Beware or you could end up losing your friends because you are always talking of IPOs, scaling up and branding. As for the future, I for one don't see Microsoft or anyone else beating Google at their own game. Sure they would get close. But if the people at Google are on their toes, then they could really win hearts across the globe.

Tuesday, July 24, 2007

Grabbing frame from video

This is in continuation of my earlier post where I wanted to pick a color from an Image. Only this time, I wanted to grab a frame from a mpeg2 video and save it as a file so I could submit it to a photo contest. I got a couple of software none of which worked. I then decided to take matters in my own hand and use the Screenshot program in java that I had to take a snapshot of the video while it was paused. There's usually a slight blurring and I was okay with that.
To my amazement, the results were astounding like straight out of a Stephen King novel. First I played my video using Windows media player. Then I paused it at the frame I wanted. Then I ran my Screenshot program to save the frame to a PNG file. So far so good. Now that I had saved the frame I wanted, I let the video play till the end. Then when I checked the saved image guess what I found. The image stored was the last frame from the video and not the frame I wanted to save. It was as if the image got updated by itself after the java program had saved it and exited. How could this possibly be.
I wasn't ready to give up just yet. The last frame got saved to the file since the video kept running till the end. What if I didn't run the video after the file was saved and left it in pause mode. So I tried this out and I got my frame in a image. The picture was still inside of the WMP in the image which I planned to correct using the 'crop' tool of my image editing tool. Again, when I loaded the image into the ImageEditor, the results were frustrating to say the least. The 'crop' function wouldn't work. It was as if the image had a mind of its own and wouldn't respond to my effort to scroll the image. The picture inside the WMP itself would remain stationary while the rest of the picture scrolled. In the end, I decided to make the best use of what I had and just cropped the portion of the image I wanted AND was visible, and saved as a new image. So I had the picture I wanted or so I thought. I closed my ImageEditor and also WMP which was still paused. I was ready to upload the image I had saved to my website. I wanted to check the image before I uploaded it and when I opened it, I was amazed at what I found.

"The image was pitch dark and there was nothing but a black rectangle where earlier there was the picture of a marble structure."

Is there a scientific explanation that has to do with codecs and proprietary video formats or should I treat this as something out of a Stephen King novel.

Sunday, July 22, 2007

I was in Jaipur in May'2007 on some business and I had a chance to experience the culture and climate of Rajasthan for the first time. I was treated to some warm hospitality and saw some great architectural sights. Here's a video from my trip showing the magnificient Birla Mandir.

Friday, July 13, 2007

Recently, I got interested in plugins (extensions?) for the firefox browser and the feature I was looking for this. "Being able to capture the content of a portion of a webpage and store it somewhere with the possibility to transform it later into a different format. The search led me to this site which fit my need to a T. It is a web 2.0 site which allows uses to clip contents of web pages and store it on their site. Cool, isn't it.

The link.

Sunday, July 08, 2007

The Taj has found a place among the seven wonders once again. It took an intense SMS campaign towards the end to get the Taj among the elite list. The other monuments that have found a place include

>The great wall of china
>Rome's Colosseum
>Jordan's Petra
>Peru's Machu Picchu
>Brazil's Christ the Redeemer statue
>Mexico's ancient city Chichen Itza

The number of votes received by SMS seems to bethe basis for the selection of the final list. A more accurate criteria would have included a number of factors such as
the novelty of the concept, the awe inspiring nature of the monument (subjective) and more measurable factors like the number of visitors to the monument, the difficulty of execution etc. The monuments that made it to the list all deserve to be among the top wonders of the world irrespective of the number of votes they received.
Federer beat Nadal in a marathon 5-setter on sunday. The match was different from the games of the past when players like Becker, Edberg and Sampras were around when the point usually consisted of a serve, a return and a volley. This time around there were powerful groundstrokes from both players and both players played some great tennis. It was only in the very end that Federer could assert his dominance on grass to win his 5th Wimbledon title. So it is still "Federer on Grass and Nadal on clay". How long that will that stand good is anybody's guess.
In the women's segment, France's Marion bartoli fought valiantly against Venus Williams and it was only some powerful serving and raising of her game that saw Venus retain her title. With a better serve and volley game, Marion could be a force on grass court tennis.

Friday, July 06, 2007


I had mentioned earlier that I had cleared my mind of the wicket related stuff I was working on. I had kept the files intact and today I had the opportunity to tinker with it a little bit. I started tomcat and browsed to the link and it worked like a charm. I might be onto something here. A treetable component capable of editing XML in your browser could have many uses in these web 2.0 crazy times. RSS comes to mind immediately but any XML could be edited. Here's a screenshot of my editable XML treetable showing a ruleML file.

Thursday, July 05, 2007

The other day I was listening to the track "Stuck in a moment you can't get out of" from U2's album 'How to dismantle an a*****c b**b'. By their standards, it looks quite ordinary though that might change as I get to hear it more. I am great fan of U2 and feel that their album "Joshua Tree" is in my opinion the one of the greatest albums ever made and the song 'with or without you' quite simply the best song in the album. I have seen people rating 'Achtung baby' in the Top ten rock albums and Iam ready to agree with that too. One thing I noticed and Iam sure many would have also is why the long names. Their last album title and the song I mentioned above both have more than 5 words.
Their work in eradicating poverty is admirable and they deserve to be the highest paid Rock stars for their music and commended for their charitable work.

Thursday, June 28, 2007

Added a new features to my blog. You can now see daily top ten list along the right side of this blog. You can also express your opinion by voting on the items in the list. If it is a media item, you can also click on the link next to the item to visit the item listing on amazon.com. I hope this feature will add more interactivity to my blog and make things more fun.
Two products from internet innovators that are for limited number of users are the EC2 from Amazon and Google's Mashup editor. Both are radically different products and have nothing in common but that they are for limited trial offers. Amazon EC2 is a business model thought up by Amazon founder Jeff Bezos and relies on making available servers and hardware on a as needed basis. This means that you don't have to pay for computing resources you don't need right now. The exact nature of the program is still not clear as the offer was limited to only 10000 users and was taken up in no time at all. In fact, the story goes that one would-be participant who missed out was ready to offer $20000 for a seat to another who was successful but his offer was turned down. Such was the attraction that the Ec2 program had on the internet community.
Google Mashup editor is a relatively new offering from Google. It is amied at making building mashups easy and should pave the way for better mashups in less time. It isn't appear to be in the same league as EC2 in business terms. Google nevertheless is testing the water before making it available for public consumption. A couple I have tried myself include
1. A wiki based product from IBM alphaworks
2. A great product from openkapow

Would have loved to get my hands on Google's mashup editor though.

Wednesday, June 27, 2007

I had this requirement to pick the pixel color from an image. I usually use a image editor program that I have to select the color. Iam aware that programs like photoshop would do this kind of thing quite easily. But it didn't make sense to start photoshop if it wasn't already running just for this small requirement. As usually the case with free programs, the image editor software started acting strange and would not tell me the color. So I began searching the net for ColorPicker programs. Most of the results were for html websites that allow you to select web safe colors. There was a flash based one which I couldn't use because I didn't have flash installed. Another was a COM based google gadget which I couldn't test because I didn't have google desktop installed. So I went to the usually reliable Java for a solution. Only in this case it didn't prove so reliable after all. I call it usually reliable because there's always some java code out there that does what you want. A small example would be when I had to capture a screenshot and the print screen function was not working. A java code I found on the net did just what I wanted. I was hoping for something similar to happen with the color picker as well. But no luck. To select a color from an image, you would have to be able to manipulate the image at the pixel level. Java 2D allowed you to do that. But life is never simple, is it? I was working with a jpg file and to obtain a BufferedImage from a jpg file, you need a jpeg decoder. The sample code said that this could be done using something like below:

InputStream in = ClipImage.class.getResourceAsStream(imgFile);
JPEGImageDecoder decoder = JPEGDecoder.createJPEGDecoder(in);
final BufferedImage bufferedImage = decoder.decodeAsBufferedImage();
in.close();

Only the jai-imageio project which contained JPEGImageDecoder did not have any JPEGDecoder in it. So it was back to search for JPEGDecoder and there were very few hits. The GNU classpath project had a JPEGDecoder and after getting all the files, it became evident that it wasn't quite the same as the decoder I wanted. The documentation was also scarce and by then I was able to get the color I wanted by running the image editor on my laptop.

Moral of the story: Don't go on a wild goose chase

Tuesday, June 05, 2007

This year's javaone a 'damp squib'? It sure does appear like it. Considering all the hype that was generated before the conference, this years' javaone definitely was pretty ordinary compared to previous years conferences. After thge keynotes and the announcement about JavaFX, it was as if they all had into a deep slumber only to wake up once the conference was over. Or maybe a Maoist regime had taken over the moscone center and imposed a blanket ban on any news getting out. Whatever be the reason, if the powers behind javaone think that 1 solitary announcement maketh a conference, they better think again. With the likes of Microsoft and Adobe coming out with new platforms for computing, java would have to buck up and get going if it does not want to get left behind.

Wednesday, May 09, 2007

Babel is a movie with intersting sub-plots that are full of emotion and the actors have given full support to the script. That they have given their best is evident as this movie is definitely oscar material. Brad Pitt is a different person in this film and a welcome change from the usual slam bang stuff he is known for. The story revolves around a american couple who are traveling in Morocco when the american woman is shot accidentally by 2 Moroccan sheperd boys. The movie traces the lives of 4 different people, that of the american couple, the nanny who looks after their kids, the moroccon boys family and surprisingly a japanese connection in the form of a hunter who happens to gift his rifle to the boys who end up shooting the american tourist. The last connection is so far-fetched that it could have been left out or atleast treated with a bit more sensitivenes. What does the japanese gifting the rifle to a Moroccan have anything to do with the problems faced by his deaf daughter.
Especially considering that most of the nidity in the film is centered around this Japanese girl.
The editing does lend to keeping the interest in the story alive but only ends up confusing the viewer about whats happening. A case in point is the telephone conversation that Brad has with the mexican nanny. Does he have it before or after the ordeal his kids go through. Could have been avoided. The director makes sure that the viewer is not bored with some clever screenplay and delivered a good movie containing elements of human interest. rating: 3 stars over 5

Monday, May 07, 2007

It's been a while since my last blog mainly because of some stuff I got involved in. Our company is getting into other businesses away from developing the XML editor product. That has been put on the back burner temporarily to see if could strengthen our bottomline before contiuning development on that front.
Come May-June and the summer is at its peak here in Chennai. The showers expected from the depression that formed off the coast disappointed last week. The power situation isn't all that good either. Its important to drink plenty of water to avoid dehydration from the heat. It was another hot and humid afternnon this saturday when I went to the juice shop for a cool drink. I had a slight pain in my right ear for which I was taking medication and which hurt if I had anything cold. So I ordered a fresh juice with no ice and waited. There was this man by himself, 40-45ish and dressed in a pant and shirt. But it was only after watching him for a while that it dawned on me that he had quite a big sweet tooth. He sat there by himself surrounded by plates filled with fruits. He ate them after sprinking sugar on them. He then went on to order an icecream which he ate after adding sugar. Icecream with sugar, imagine. All this time I was enjoying my drink with an occassional look at him. I was getting ready to leave when I heard him asking the waiter for a banana milkshake with dry fruits. I couldn't help but think that the poor man must have been finding it difficult to get his family to serve him enough sweet stuff to satisfy his craving.

Sunday, April 22, 2007

I have blogged about this so many times before that by now half the people using the internet probably know that Iam speaking at Jazoon'2007. However, I have the Jazoon logo which I thought would be nice to add to my blog. So Iam including the logo of Jazoon together with a link to their site below. Just follow the image link and scroll down to session no.660 to read more about the paper Iam presenting at the conference.

Thursday, April 19, 2007

Finally the super-8 rounds are over and the teams that will be facing off in the semi-finals has been decided. It will be Aus vs S.Africa and N.zealand vs S.Lanka.
There is some talk whether what S.Lanka did was right. i.e resting key players against a tough opponent like Australia. They probably felt that this way they would qualify second and meet N.zealand in the semis instead of Australia. They were well within their rights to rest their players at any stage of the tournament irrespective of whethey they had qualified or not. The motto should always be play to win though the Australians seem to carry that a bit far at times. But sometimes caution is the better part of valour.
The competitive spirit still is present in this world cup also. In 2003, the semifinals was far more interesting than the finals where the ozzies drubbed India. Even in the football world-cup, the semi-finals were more interesting than the finals atleast until the materazzi incident livened things up. In Tennis, you often see Federer facing off with Roddick in the semis to pick up a facile win over an unseeded finalist in the final round. So don't underestimate the power and intensity of the semis.
Someone was grumbling the world wasn't the same without India and Pakistan. Both their campaigns if narrated would put a greek tragedy to shame. The world cup has still had its fare share of moments both on and off the field I would say. W.Indies approach and performance makes you think if they were serious contenders at all. They manage to qualify by the skin of their teeth and their batsmen took you back to the days of test cricket whem run-rates of 2.5 runs per over was the norm. Brian Lara didn't help his teams cause by taking the powerplay from the 45-49th overs either. Of late, some merit is being seen in holding back the powerplays until a set batsman has gone back. But to hold it back till the 45th over is stretching things a bit. What difference does it make if the runs are scored in the 39th over when they opponent is only 2 down and have 7 more players to whack the ball around near the end.

Tuesday, April 17, 2007

Does a rehash count as a sequel?

I am referring to the film 102 dalmations from walt disney pictures. I had seen 101 dalmations before and found it great. Hoping to have a similar viewing experience, I went and rented out the 102 dalmations. Guess what? 102 Dalmations is a rehash of 101 Dalmations with a few minor changes here and there. In fact, it was like watching 101 dalmations all over again. And the reason struck me only later. Most of the scenes were the same as well. The disney company had used footage from the original in this movie also shooting only a few extra scenes to make the movie look different. Does this count as a sequel. Especially when you consider the large sums being spent on the batman and pirates of the caribbean movies. Imagine the plight of those who purchased tickets to watch this so called sequel and rented out the DVD. If someone did a video diff betwen the original and the sequel, I am sure the difference would be not more than 10 or 15%. Such is the amount of reuse. Seriously Disney folks ought to consider refunding my money back.

Sunday, April 08, 2007

Is Ruby designed to run only on Linux?

Iam forced to ask this question because of what I have seen from the little I have worked with Ruby. The Ruby core itself installs and runs fine on windows. Its only when you want to install some gems that the problem arises. The command to install the gem is

c:\>ruby gem install

This failed with the message that 'NMake' was not found. I checked on the net and found a link at Microsoft.com where I could download 'NMake'. After I downloaded and copied 'NMake' to 'c:\ruby\bin', the error I got was 'cl' was not found. If I remember correctly 'cl' is the microsoft C compiler. I tried to replace 'nmake' with make and cl with gcc by downloading cygwin. But I couldn't figure out the place where I would change 'nmake' to 'make' since most of the files seem to be generated files. So the gem install process overwrites my changes. This is what has caused me to pose the question above which is

"Is ruby designed to run only on linux?"

Tuesday, April 03, 2007

What's the good framework for developing a web 2.0 application?

This is a question that I have been asking myself for sometime now. First of all, I wasn't sure whether a web application was such a good idea since I had spent most of last year working with thick clients. So for the moment, Iam setting aside this question, to be able to objectively decide which framework would be the best for data oriented projects. I am saying data oriented because if it were a text editor or had lots of charts, graphs etc, a thick client would win hands down. So the project has to be such that both a thick client as well as a web application can handle. With RIAs the gap between thick and thin clients has definitely narrowed down. This should only aid us in our evaluation.
Let's take a sample project for our evaluation. Since there are a number of web component frameworks available, let's assume we will be using one such component. The Tree component would be a good component to use. The data for the tree itself could be something hierarchical like an organization hierarchy. A requirement of 'Shenandoah corp' could be to get each employee to fill in a questionnaire. So for each employee, a form has to be presented and their inputs taken and then stored in the database. Soem fields in the form might require interfacing with the company's databse in DB2 which might require a web service call to be made. Since the budget for this project is low, the entire development has to be completed in 1 man month. The company also has plans to showcase the application to their customers which would imply that the application be web 2.0. It wuld therefore have to use Ajax and provide the same experience as visiting a site like digg, flickr etc. With the above in mind, let's proceed to narrow down the tool/api/frameork to use to implement this. To begin with, the available frameworks are as follows:

1. Flex 2
2. Wicket
3. Ruby on rails
4. GWT
5. J2EE
6. Seam
7. Struts

Since Ajax is needed, no 5 and no 7 are eliminated right away unless some means of Ajaxifying j2ee and struts is available. The rest are all even contenders which leaves us with nos:

1. Flex2
2. Wicket
3. Ruby on Rails
4. GWT
6 Seam

the eighth ofcourse being the Swing based thick client.

Who won the race and which framework was finally chosen to build the application. Watch this space to know the ending.

Monday, April 02, 2007

Modern day ten commandments:

1. Thou shall not download movies/music on to DVDs/CDs
2. Thou shall not jump the line at ticket counters
3. Thou shall not run the red signal at every opportunity
4. Thou shall not check your email 20 times every hour
5. Thou shall know the difference between a blog, a wiki and a podcast
6. Thou shall not talk on your mobile while driving
7. Thou shall not party for days without a break
8. Thou shall embrace open source at some level
9. Thou shall learn to live without your blackberry
10. Thou shall not go to bed with your ipod