Wednesday, June 6, 2012

virudhaarthi..


I have a lot in mind when it comes to differences between the way of life in India and USA...I thought of starting with the mundane day-to-day stuff... Metro Line / Bus So the algorithm here works like this. You find out the bus number, stop to get down at. Whereas in India you had all the power, voice and guts to fight with the conductor for change i.e expecting the conductor to give you change for a 100 Rupee note when the ticket costs just 5 bucks...here in US, you manage to get up an hour early before your travel, decently go to the nearest Bank, wait in the line till the teller calls you up and very politely hand over a 10$ note and ask for 1s and quarters!!!Why?Coz in Metro line its 1.5 bucks whether you have to get down at next stop or last stop and you insert the bills into the machine and the machine not going to give you any change so if you were dumb enough to get in with a 20$ note then bam!! off you go with 20$ for a 1.5$ ticket.... Now that we got the ticket out of our way, lets see the boarding part. If one has ever travelled by BEST in Mumbai and managed to get into a 92 or 501 then they would know the rush. Most often it happens that the ticket is bought by pass of hands.....you are standing on the foot board, the conductor is standing near the driver but human chain as they say....skillfully the ticket is bought just before your stop comes... :) In US, as every passenger gets into the bus, the driver patiently waits for each one to put their bills in the machine. Imagine if the BEST drivers had to do that...not less than 15 people get into the bus at every stop and if he had to wait for everyone to get their tickets and then start the bus then we would never cross a stop!! When I hear the automated announcement of arriving stops here in the buses, I miss the thunder voiced conductors back in Mumbai...from whereever did they get that kind of volume to shout out the stops :) One noteworthy thing about the facilities in the buses here is their respect for physically challenged. Everyone comes together to make them comfortable while travelling.

Write an efficient code for your life.....


So this is an analogy for all those familiar with any OOP or programming language...As geeky as it might sound, its something that crossed my mind when me and my friend spent 2 whole nights on an assignment and were stuck big time on an issue which held us from moving forward with it. The next day, within half an hour another good friend of mine spotted out a mismatch between ':' and '.' which was the stopper in our program....What we had missed out was that though we wrote a try catch block, we did not print the exception in the catch block so were totally lost as to what was happening.... now what possible analogy could I come up with after this falacy or should I say carelessness of ours? My friend who had broken his head with me said very calmly after 2 whole nights of frustrated attempts, "The mistake does not lie in the mistake per say but the fact that we did not debug well i.e we caught the exception but did not handle it or even try to see what the exception was".... Somehow it struck me that this is life...... Think about coding our life in java....lol okie dont judge me....i know coding is having a huge impact in my day to day life since now I have come up with comparing life and java!!! But its a nice way to look at things... The things you want to do in life should always be within a try block. However risky the endaevour be, you might feel this task might not see its end, may be its too ambitious, may be not to your reach..but you feel like you should "try"....so go ahead write those actions in your try block....but what is important is that you handle it in your catch block...its as necessary to handle and face your mistakes as it is to go ahead and do something....only if you fall...will you know to get up....and only if you get up again will you learn to walk..... your first step is to put your dreams, goals and hence the implementation plan in the try block... next is to catch any exception i.e mistakes or hurdles that you may face in the catch block....now you know where you went wrong....read the exception....learn from your mistakes and handle it in your catch block....if you realize this was not the right way....modify your code in the try block and you can always re-compile your program!!!Life gives us lots of opportunities, it is in our hands how many times we want to modify what we want to, how long it takes to realize that this is probably not my cup of tea and that i should move ahead to the finally block ;) Family is like static variables....they dont change....they are there through the lifetime of your program(life)....you can reach out to them(access static variables) anytime... :) Friends are like local variables...they are specific to your program. You give them an initial value....they help you out at times of function calls or when you are stuck in a loop etc....the very famous "i" in the for loop :) could just about be your best friend..always there to make sure you dont get carried away in a loop....hahaha....funny how we can relate things.... try but dont forget to catch.... :)