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.... :)
Wow! Wonderul analogy... :)
ReplyDelete