Wednesday, June 10, 2009

Twitter, Ruby on Rails and Jack Dorsey

Jack Dorsey [@jack] gave a talk at IBM research today. He came 'plain' with no slide deck but it was a great talk and Jack is an exciting speaker [ at least for me, he has the geek appeal :)].

IBM Research Talk with Twitter's Jack Dorsey from IBM Research on Vimeo.


Jack talked about the history, his obsession with couriers and dispatchers etc and gave an exciting answer to one of the questions I asked :)

Question: Do you think that your initial choice of technology effected the progress of twitter ? in other words If you were to do it again would you use rails or something else ?

Answer: [Not in the exact words but the intent and meaning is not modified. I did take a look at the recording. The time in the video are from 53.31 onwards ]

Yes. For example the use of Rails made the application accessible to people withing 2 weeks! The fact that people saw the application and reacted to it with such a short time was very important. Florian Weber , One of the Rails core committers was in the team (with close ties to DHH) and that also was enticing in choosing the framework.
The mistake we did was putting it all out there. We did not follow a controlled expose methodology and that is what came to bite us.
As for the technology perspective I would not have changed anything! We would be cautious and expect explosive growth but the platform would have been the same.

--

Obviously the actual answer is longer and the above is just the gist of it. However given that Twitter is the poster child for Ruby on Rails and Twitter reportedly had so many hiccups, it was surprising to hear Jack say this. His point was that because of the technology they were able to get the look and feel and the functionality rapidly and that made what is Twitter today.

The importance of this statement is that it is a realization of the wonder of rapid development with agile frameworks :) I have friends who believe that everything need to be done with basics without using packaged functionality. Also I've seen many efforts in the early phases of projects (sometimes simple ones that may not even go beyond a proof of concept) that focus on premature optimization and finally result in horrible code that is extremely difficult to comprehend. The sad part is that sometimes it is deemed that such complexity is necessary ['How are we going to efficiently use our memory then ?' ]. Jack answers all these 'fallacies' [ that is exactly how I see them ] by endorsing rails :) His point is that what is important , especially in socially driven applications such as Twitter is agility. Agility comes with more abstraction !

These days I work with Rails everyday and given the complexity of the application suite we (Max, Roy and me) are building, if we did not have Ruby on Rails, we wouldn't have done even half the stuff ! Its amazingly productive and given a good rails tool set (I use Eclipse Aptana studio - free version of course) it becomes a really good competitor to any Web development framework. And Jack just polished the chrome making rails shine more :)

Tuesday, June 02, 2009

How much is it gonna cost ?

While listening to a recorded interview with the defense secretary of Sri Lanka, I built the curiosity to find out what kind of funds are needed to sustain a war. We hear about terrorist organizations every day. What we don't hear or don't understand is the cost of sustaining their activities.

Amazingly it takes an enormous amount of money to sustain a war. From a quick search I gather that an RPG costs around $300 per unit and the launcher costs around $500. Given that terrorists can't just go to a store and order 100 RPG's they'll be paying much more than that in the black market. Let us double the price and count it as $600 for one RPG. Even a Westerner would just twitch on this number but you have to really consider the third world to see the enormity of these values. For example the gross national income per capita in Sri Lanka in 2007 is $1540. In other words one RPG costs a little less than half the yearly income of an average citizen!

These numbers come into perspective when you see the weapons caches the clearing operations turn out everyday in Sri Lanka. This report for example states that nearly 30 RPG weapons (which I presume launchers) have been recovered. From our calculations the launchers alone would have cost them $30,000 ! There has been numerous reoveries of weapons caches and they not only turn out RPG's - guns, ammo, satellite and communication equipment, explosives (claymore mines) etc are common findings. I'm sure if one is to count the complete cost of these weapons (I meant cost - not value - since when an illegitimate organization acquires such weapons I assume they have to go through the black market and pay more than the actual value) that were recovered, it'll easily dwarf millions of dollars.

Where can all this money come from ? As for the LTTE most of the funds came from extortion, drug trafficking and other illegal activities. I would assume for other organizations such as Al Qaida, it will be more or less the same means of fund raising. What most people don't realize is the enormity of these funds when they sum up. The Sri Lankan army once reported that the terrorists use a higher grade RPG (obviously more expensive) than the army version. The Sri Lankan forces never had the ZPU-4 type anti aircraft weapons that were recovered from the terrorist stronghold. So simply the terrorist challenged a government (of a country that ranks at 78th position in GDP, So Sri Lanka is poor but not dirt poor) in terms of their financial power, a power that came from summing up a number of illegal activities!

Thursday, May 21, 2009

Shotgun Diplomacy

I don't know anything about international affairs or what and what not to do in foreign relations. The bit I know tells me diplomacy is the opposite of tactlessness and diplomats are supposed to be respectful people. The following news articles however , made me question my understanding of diplomacy.

One is David Miliband's diplomatic catastropy, according to the Brits themselves. The other is Hillary Clinton urging for reconciliation. it seems all rules of diplomacy comes into play when there are other interstests. If a poor third world country that has no natural resources of interest [ like that black gooey stuff, mmmm.. what do they call it? Black gold may be ;) ] becomes entangled in a matter that requires diplomatic intervention, it doesn't matter whether protocols of diplomacy were preserved or not. The so called diplomats can do anything and just get away with it. it doesn't really matter to them since they are dealing with someone who cannot make any impact on their way of life, at least that is what they think.

This has been the case regarding Sri Lanka all the way. David Miliband for example (who has become an extremely unpopular character in SL) reportedly tried pushing his agenda as if Sri Lanka is still a British colony, an agenda that completely sidelined the Sri Lankan government. United states has also been misled and plays the policemans role ( as always ) saying over and over about reconciliation, holding an IMF loan hostage [Hmm... I in IMF stands for International as far as I remember]. I have great respect to Obama and (Hillary) Clinton [ in that order] so it makes me extra sad to see them being misled and being dropped into the same bag as their predecessors.

I started this post few days earlier and many things happened since then. UN secratary general (UNSG) coined his new word ,'appalling' that every news agency reiterated, often giving no mention of what else he said [There are reports that show UNSG having two tones during two news conferences] . New news reports popped up suggesting an enormous death toll that fuelled a dying fire. The sad part of all this is the apparent ignorance of all the facts . No one seems to be concerned about where all the questionable numbers come from or their validity [ thank god there are no more anonymous satellite phone calls ] . The civilian casualties of American, British or Israeli military ordeals are conveniently termed collateral damage. No agency writes or asks for immediate intervention about human rights for Gitmo detainees. Don't get me wrong. I'm not angry , just frustrated about this serious imbalance. All these makes me wonder whether the first world everybody believes in is really a first world!

Tuesday, May 19, 2009

Independence 2.0 for Sri Lanka

Sanjiva has a great blog post on the second version of independence in Sri Lanka. It is indeed a rebirth of the independence for us. In case you are totally unaware of what is happening in the world and wondering what in the world I am talking about, the 30 year long civil war in Sri Lanka is officially over.

When I look back I have lived almost entirely during this conflict. I can't remember a war-free country (until now) and I have never been able to travel to the northern tip of my small country even though I've traveled around the world. It was interesting (and annoying) to see the so called bipartisanship of the Western media, the variety of efforts to hinder the effort to finish a ruthless terrorist outfit, the real intentions of the so called 'protectors of human rights' and the incompetency of some of our own who did not want to see an end to this conflict. A year before, no one (including me) believed that we would ever reach this success this soon. However proving that 'if there is the will, there is a way' the Sri Lankan armed forces, the political leadership and all Sri Lankans were able to push it to the end.

Mahinda Rajapakse , His excellency the presdient of Sri Lanka really deservers his title. I have been under the reign of all the (Sri Lankan) executive presidents during my lifetime and Mahinda is the best real leader. He had the guts to push the efforts till the conflict came to a conclusion. Some say he is corrupted - I don't care. He gave the right leadership to end the conflict and that shadows everything else. I have faith in Mahinda that he will bring a lasting political solution to this conflict and he clearly expressed his intentions by actions.
  • He is capable of addressing the nation in all three national languages including Tamil. I don't know how he managed to pull that off but none of the past presidents have taken the effort to learn Tamil let alone address the nation. In fact when I was in SL a few months back I saw Mahinda addressing the nation in Tamil and stood up in amazement! To me, having a leader who can address the nation in all the national languages is itself a sign of unification.
  • The presidents first address to the nation after the war started in Tamil! That fact itself is an enough answer to Western media that say Mahinda is a hardliner.
  • One of the most significant statements he made was about minorities. He basically stated that [ not an exact translation ] 'there are no minorities in this country, there are only people who want or don't want to see the success of Sri Lanka'. Very true
However We as Sri Lankans cannot just push all the responsibility over to Mahinda and wipe our hands on the next phase. All of us have a resposibility in doing our part in making Sri Lanka succeed. Mahinda has given the start, all of us should do our part in getting a lasting solution and making sure we reach prosperity.

Friday, May 08, 2009

Across America - Day 3

The earlier part of the story are in Day 1 and Day 2.

Monday May 4th - 9.00 am {Mountain Time}
Car needs an oil change and I've already driven about 200 miles over the oil change millage. The hotel clerk pointed me to the Walmart next door [ Now thats convenient :) ]. There was a line for lube and tires, and most were cross country travelers like me ! Time for breakfast and stock up the coffee.

Monday May 4th - 10.00 am {Mountain Time}
Having driven across two thirds of Wyoming under darkness, I never realized how breathtaking the scenery is. Wyoming has an interesting terrain, its flat towards Nebraska and becomes hilly towards Utah. Western Wyoming is absolutely gorgeous in terms of scenary.
I've learned a new lesson about cruise control, primarily when I crossed over to Utah. Cruise control is great when you want a controlled descent at highway speeds. However when on the climb, the transmission automatically downshifts halfway through and cruise control kicks up the engine speed , in my case from 3000 rpm to 5500 rpm. There is not much of a jerk but this sudden speed change is bad for the engine, given that the car has some miles on it. So far I had only few such situations and I've driven 99% of the trip on cruise. As a note of warning, it is not recommended to use cruise control during rain. If there is danger of hydroplaning, cruise control might throw you off to an uncontrollable speed. So far I haven't had serious rain or any signs of hydroplaning conditions.

Monday May 4th - 12.30 pm {Pacific Time}
Salt Lake City at last. I've been here two years back but never got to go to see the salt lake. Its extremely huge, white and totally unlike what I expected. The road is flat again :)
One interesting item that I took note before reaching SLC is a 'runaway truck exit'. Its basically
a sand dump that helps to slow down a fast moving vehicle, probably a truck with failed brakes.

Monday May 4th - 2.30 pm {Pacific Time}
Nevada is unlike anything I expected. My impression of Nevada is a big, flat, hot desert. But hey, northern Nevada is completely the opposite. Snow covered mountaintops, winding roads and signs that say "frequent deer crossing when flashing" ! [ The lights were actually flashing though I didn't see any deer] There are numerous signs that mandate the use of chains [ For the unknown, during heavy snow, vehicles put in chains around their wheels for traction. Its rare in the mid west but when it comes to the mountains such as the ones in Nevada , certain sections of the highway mandates the use of chains, primarily for heavy vehicles.]

Monday May 4th - 6.30 pm {Pacific Time}
I stopped at Winnemucca NV for a late lunch and some more coffee. The stop was completely unplanned but it turned out to be the halfway point between San Francisco and Salt Lake City. To my amazement when I exited the almost deserted highway ,I was suddenly in this nice little town with old buildings and lot of people. Winnemucca is also the point where the highway turns south west.

Monday May 4th - 8.30 pm {Pacific Time}
While crossing the Sierra Nevada mountain range I faced the worst of conditions that can occur at once. It was raining, pitch dark, the road is twisty and the highway is under repair for about 50 miles. It is harder to drive with all those big trucks going by since when they pass you, there is a fine mist of water that completely blocks the view. This is specially difficult when you are in a low profile vehicle such as a car.
My little GPS has been an immense help throughout the whole trip and specially in this area. I always observe the GPS to get an idea of the road ahead,like whether there is a sharp curve, an s curve etc. Whatever the gizmos you have, its still not possible to navigate a car in zero visibilty. So I followed the best safety procedure of all - slowing down !
This slow driving did cost me though. I expected to fill up in Sacremento CA but with the gas I had in the tank , I was not sure whether I'll make it. It would have been a disaster to run out of gas in these conditions so I stopped by in the first gas station I came across in the middle of the mountains. Car got gas and I got coffee. The rain seemed to have died down and hopefully I'll get more visibility.

Tuesday May 5th - 1.00 am {Pacific Time}
Reached my hotel in South San Jose. It's been 3 days of nonstop traveling and I am finally back where I am supposed to be :) It's been an easy drive from Sarcemento onwards with no rain.

Here are some tips for the cross country travelers from my experience.
  • Take a GPS unit. I have a Tomtom one 3rd Edition , a cheap but extremely functional unit which I bought right after I got the car. One can pickup one of these things for about $70 now and their value is immense when you are traveling through unfamiliar areas. It is always a good idea to have a map with you in case the GPS fails [ It happened to me once , right after I did a software upgrade to the GPS. I've been careful to keep the running version of the navigation software unchanged after that]. This advice might not work with everyone though. Even among my collegues , there are hard core GPS non believers! . Topher for example always questions the directions given by the GPS and trusts the road signs more than the GPS instructions :) Unfortunately for such non believers [sorry Topher ;)] almost all new cars [specially the German ones :))] come with in-car naviagation systems so you get one whether you like it or not!
  • Eat lightly and take more coffee. Replace coffee with whatever keeps you awake. The idea is keeping your senses alert.
  • Make sure your car is running clean and well. Wiper blades, filters,brakes and tires are a few things that you should look at before making a long trip. If you do regular maintenance then this is not really an issue.
  • Make the trip in the Summer(late Spring / early Fall) if possible. I can imagine how it would be during the Winter !
It would have been nice to have Dharshi by my side :) She would have enjoyed the scenery and I would have planned for a longer, less hectic drive. However on the bright side there is no one to complain about my taste of eighties music [ Again Topher is the right guy to ask about my choice of music specially during long drives], nor my undiscovered vocal skills :D

The summary of my carbon footprint (Thanks Chinthaka for giving me the idea)
  • Total distance driven (according to car odometer) - 2581 miles (4153 Kilometers)
  • Total Gas consumption - 85.43 US Gallons (323.37 Liters)
  • Average mileage - 30.21 miles per Gallon (12.85 Kilometers per Liter)
The map follows. I might have not placed some pictures correctly - specially the ones taken in Nevada.


View Drive - 4th May 2009 in a larger map

Wednesday, May 06, 2009

Across America - Day 2

If you are wondering about Day 1, its the previous post.

Sunday May 3rd - 10.00 am {Central Time}
Left Independence MO heading north. My original plan was to go via Denver but thought it would be good to avoid the mountains at the last moment. GPS told me it is shorter to go via Nebraska so I decided I'll just take my chances (?) and head north [I'll anyway have to head north at some point]. I also decided to keep the camera out so when I see interesting stuff I might just point to that general direction and shoot.

Sunday May 3rd - 1.00 pm {Central Time}
Stopped just after passing Omaha NE for brunch and coffee. I didn't realize that one needs to enter Iowa before reaching Omaha. Interesting enough, there is significant wildlife along the way [which translates to many roadkill, specially Deer] Some such roadkills are so gruesome which makes me think that driving in these parts of the world may not work out for the faint hearted :)

Sunday May 3rd - 8.00 pm {Mountain Time}
Stopped for dinner and gas right before Cheyenne WY. What ? There is no "Welcome to Wyoming" sign when entering Wyoming ? I've completely crossed Nebraska and was looking for the welcome sign to note when I am entering Wyoming. Sadly there was no sign [Even I couldn't have been that blind :)] and I only noted the change in the road signs. I've hit rain in the middle of NE but its flat land and nothing much to worry about. The scenery is amazing but I did not want to break the momentum by sightseeing.

Monday May 4th - 1.30 am {Mountain Time}
I decided to stop for the day at Rock Springs WY. The original plan was to reach Salt Lake City for the night but its still about 200 miles (at least 3 hours) away. I could have gone further, at least till I reached the state line, but the car was due an oil change. Human settlements have become scarce [ It was usual to see signs like "next exit 10 miles"] and I was afraid I might end up in the middle of nowhere 100 miles later [ use the GPS you dummy :)]. Thank god these guys have working wireless.

Total distance for the day is 954 miles (roughly 14 hours). The images are placed approximately since I don't have a geo tag enabled camera. Await the story of the day 3.

BTW I always wanted to say this. Coffee in Missouri, Lunch in Nebraska and Dinner in Wyoming :)

View Drive - 3rd May 2009 in a larger map

Tuesday, May 05, 2009

Across America - Day 1

I'm in California at IBM research once again and this time I decided to bring my own car now that I have one here :) However Dayton, OH to San Jose CA is not a short drive, it's 2457 miles (3954 kilometers) and its not a drive that one can make it one day. So I decided to do one of those things that I always wanted to do, drive across America ! [ Well the original plan was to do it on a Harley. An aged Honda Accord is hardly comparable to a Harley and Dayton OH is 'mid west'. I might do the original someday but this is good enough for now : ) ] This is the story of my great American crossing , split into 3 posts. I would have blogged/tweeted from the road but after 14 hours of driving there is nothing else you can do but sleep !

Friday May 1st 2009 - Midnight {Pacific time}
I leave San Francisco airport [Why I could not drive to CA on the starting day is a long and irrelevant story here] . The plane was supposed to leave at 11.15pm but got delayed repeatedly. I hoped to catch some sleep but there was an interesting movie, 'Yes man' that got me hooked so I watched till the end. Probably got 2 hours of sleep before reaching Chicago.

Saturday May 2nd - 5.30 am {Central time}
Landed in Chicago IL. Walked nearly a half a mile to the next gate, played with the new HP touch smart things in the airport lobby, had breakfast and fell asleep on the chair. Good that I found the gate before falling asleep.

Saturday May 2nd - 10.30 am {Eastern time}
Landed in Dayton OH. Kats, Meena and Cartic (all three ?) came to pick me up (all in one car of course)

Saturday May 2nd - 2.30 pm {Eastern time}
All packed for the journey. I already took my essential stuff so these are mostly 'nice to have' things [extra clothes, comforters, few cooking apparatus] and car stuff [Toolkit, extra coolent ] . In the hurry to leave I've brought the wrong charger for the laptop (IBM charger instead of the old gateway one) but managed to find the previous (burnt) charger and fixed it (A lot can be done with a few drops of solder and duct tape. Gateway replaced the faulty charger with no questions asked so I never got to fix the old one :)) so hopefully I can be connected where ever I decide to stay. An oil change is due in 1500 miles but the local Midas is packed so I decided I should just hit the road. To the gas station to fill up, check the tire pressure, buy a map book (in case the GPS fails) and I'm off.

Saturday May 2nd - 8.00 pm {Central time}
Made a food break in the outskirts of St Louis , Illinois. I've driven across whole of Indiana and almost all of Illinois. I've underestimated the effect of caffeine on my body. I've had very little food but double the usual amount of coffee and water but I'm fully awake with no fatigue at all. GPS estimated its 269 miles (4 hours) to Kansas City, Missouri and I decided to buy more coffee and hit the road again.

Sunday May 3rd - 1.30 am {Central time}
Reached Independence Missouri, 10 miles from Kansas City. I picked the motel that seemed the cheapest (looks are deceiving though) and decided to do a quick "I'm ok" transmission to home. To my dismay the hotel wireless network is not within the reach of my room (I find that after taking a shower and changing :() so I walked to the lobby (carrying the whole bunch of gadgets including the laptop, mic and the camera. Reminds me that I should get a new one that has all these things integrated) after grunting with the front desk but the wireless network still refuses to connect! The hotel clerk offered his advice but looked blank when I told him that "the problem is in your DHCP server"! There is no use in arguing with these people but I decided to make a formal complaint later. However when I was about to fall asleep I remembered that my phone has Verizon wireless data connection that I never use. I managed to send a 5 word email home [ the definition of who represents home is now modified ;) ] after fumbling with the numeric keypad for 10 minutes. Its 2.00 am and I should get some sleep before starting in the morning.

I've done 598 miles driving from Dayton OH to Independence MO. See the map for details. Click on the icons to see their relevant descriptions.


View Drive - 2nd May 2009 in a larger map