Friday, 16 January 2009

To Advise Or Not To Advise

.
While reading the blog of a friend, I went through the comments as well, where another of my friends had commented something. I picked it from there and put it as the status note on the Office Communicator.

Then the coding keeda started popping its head up inside my head and I thought, let's write a simple function. Please review.

....
....
void to.advise.or.not.to( )
{ if ( advice == add + vice )
do.not( );
else
throw.exception( );
}
....
....

Nice little function...

And did you notice the 'c' and the 's' ?
.

4 comments:

sanjay said...

all advices add vice ??? and if they donot then they are exception.
I disagree. As per me, all advices are useless, if useful then add exception.

MoonStone said...

being useless should also qualify as beig a vice... specially in the time of recession,... or should it not? may be...

waise exception handling ki details nahi di hain yaar maine yahan... wo wala function kabhi baad me... that will handle all the other scenarios ... ;)

Sanjeev said...

saale tune paanch saal mein is coding waale keede ko kahan daba rakha tha... aur humare asli coder...saini bhai.. ne bug dhoondh nikaala.... akhir amdocs ki training kaam aa gayi sasure ki

MoonStone said...

@Badri
bug nahi hai sale... ye to documentation proper nahi ki thi maine.. to requirement understanding me gachha kha gaya reviewer...