Tuesday, July 28, 2009

How to make a decision?

The last decade of my life has been very interesting - I had to take decisions at various points in my personal life as well as in my career - a few times the choice was very clear, at times both the choices looked equally attractive and at times both looked equally hard and difficult.

So how do we decide which one to take?

The thumbrule I have is - take the harder path. By harder I mean - I might have to work harder, educate myself on something new, might have to let go off my comfort zone, let go off things I love. But this might not be the case always - at times the easier option was also the best option.

So how do we know if the choice we had made is the right one?

The answer is - we will never know. If there was something called time travel then perhaps we will know. So I tell myself - the decision I took was the right one - always. I never regret on any decision I had taken because I know just around the corner I have one more decision to make which will be harder than the previous one. These things just keep coming :)

How about instincts & gut feeling?

Absolutely go for it - this works 9/10 times. From my personal experience and what I have found out from others - listening to your inner feeling, your heart - has a good success rate. I recommend reading Alchemist by Paulo Coelho - which will help open your ears to this heart/gut feeling of yours.

The Usual disclaimer : This post cannot be held responsible for the decisions you will be taking in your life :)

Monday, July 27, 2009

Fuses blowing off is a good thing

Can anyone spot what is wrong with this picture? Look closely - there are no fuse carriers and the lines have been shorted by a thick piece of wire.

Wondering what it means? - When an electric surge happens - there is no fuse that will blow and break the circuit. The surge will go right into the homes and kill all the devices which are On at that time - TVs, bulbs, mobile chargers...

I am not trying to educate BESCOM electricians - they are lazy & crazy and they don't read my blog - but this post is about unit tests.

Last week I answered a questionnaire for a friend of mine who is doing a course work about Agile - one of the questions was - Is it not absurd to write unit tests?

The above picture is the answer to the question. Unit tests are like fuses - they blow up in your build and prevent a blow up in production in future. Commenting out an unit test is like shorting the circuit with a thick piece of wire - like in the above picture.

For eg., when a developer forgets to do a null check - and the failing unit test is not fixed, but instead is commented out - your users will be greeted with a Null Pointer exception on the last screen of a payment page. Imagine how mad your client will be?

Anyway I rest my case - next time when you comment out a failing test - think of that picture - and imagine a surge happening and hitting a 52" Plasma TV showing the last ball of a 20-20 match...pattt...bshhhhhh - and a bunch of hideously laughing BESCOM electricians.