Saturday, April 21, 2012

Thumbs down to coin



Here is the confusion for another decade.

The coins must differ in size with respect to its value but not in India. The newly introduced coins Re.1 & Rs.2 exactly matched the size of existing 50 paise & Re. 1 respectively.

RBI Governor's imaginary response to this confusion galore,

1. Oh! is there an existing coin system? I thought I am the first one to introduce coin system in India
2. I am only dealing with currency notes and why should I care about the coins
3. I want to teach the value of money to Indians

There is a 50 paise coin with a fist and 1 rupee coin with thumbs up.
No surprise to deflate the ongoing inflation, RBI will introduce negative value coins engraved with thumbs down.

Thursday, October 23, 2008

Hats off Jai

Yeah, I am impressed with myself.

Have I achieved my goal?
Have I appraised more?
Have I got a girl friend?

The answers to all these questions are a simple 'No'.

Nowadays, I care more about environment. The humans almost made the environment look like crap. Yet, we have a chance to make Earth look like heaven. I have stopped throwing plastic bags into the streets and I have disposed them properly. It became a habit to me.

An incident, which made me to post this blog, happened yesterday. I bought two candies, unwrapped a candy and started to taste it. I never thought of disposing the plastic wrapper at that time, because I was busily chatting with my friend. But, I had put the wrapper in my shirt pocket. When I realized that, I uttered "Hats off Jai".

P.S: The post isn't a brag, but definitely a self-motivator.

Tuesday, July 29, 2008

Comment on Comments

Being a developer, I always add one or two lines of comments to my code. Here is a nice point by Steve, why the junior comments more and the senior comments less,

In the old days, seeing too much code at once quite frankly exceeded my complexity threshold, and when I had to work with it I'd typically try to rewrite it or at least comment it heavily. Today, however, I just slog through it without complaining (much). When I have a specific goal in mind and a complicated piece of code to write, I spend my time making it happen rather than telling myself stories about it [in comments].

It is always better to add few meaningful comments to your code.

Wednesday, April 30, 2008

Fond of reading

I used to read books often. I got a chance to read Memories of midnight of Sidney Sheldon. I borrow it from my company's library. I hadn't read any novels before, except Perry Mason series. So that gave more interest to read Memories of midnight. It portrays cruelty and intelligence of Constantin Demiris, a tycoon. It propelled my fond of reading. Last weekend, I went to Moore Market for a glimpse and found lots of book. I bought Sidney Sheldon's Bloodline, Windmills of the Gods, Tell Me Your Dreams & The Best Laid Plans and Jackie Collins's Hollywood Husbands & Lucky (books of my taste). I have started reading Hollywood Husbands on 50 pages/day basis. I guess I will post a mini review on this book very soon.

Saturday, April 19, 2008

My first glass of wine

I went for a team dinner at Park Sheraton after a hard working day. I hadn't have a cup of wine,but I had few drops that didn't disclose its taste. To my surprise, wine was included in the dinner package. Without any reluctance, I ordered for wine. I was waiting for my first cup of wine, in between some papads were served as appetizer. I wondered why the star hotel's prices are exorbitant, the papads gave answer for my question. Those papads were really good and mouth watering. A green empty wine glass was placed in front of me, that glass had broken my confidence that I could drink a full glass of wine.

Finally the much awaited wine was served in a narrow glass, it was a white wine. It tasted yucky at my first sip. My throat started to burn. Oh God! Have I punished myself. I still don't understand why people are addicted to alcohols. It took half a cup of water to kill the burning sense. With no experience, I gulped it as water. After few imbibes, I felt a little dizziness. So to make myself steady, I went for a refreshment. When I returned back to my seat, I found one more glass of red wine. This one was an Australian red wine served in a wider glass. A few ml of white wine was being in the first glass, there came the third, an Argentine wine. That stunned me. I guess that it is impossible for a beginner to drink three glasses of wine. I had decided to drink all three glasses, but I managed to complete only two of them. I was panicked whether it could lead to unconsciousness. There were no differences in the tastes of three wines, they all were disgusting to me. Finally, I have decided not to experiment in any outing.

Thursday, January 3, 2008

Nationalism and Sports

Most of the audience are not able to distinguish nationalism and sport. But these two are intertwined. For a nation and players, it is pride to achieve in Sports. For a viewer, it is just an entertainment.

The motive of sports between nations is to develop healthy relationship. But if it results in a condescending behavior of players and quarrels among fans, then the sports fail in all directions. If the audience and players were matured enough to appreciate others and enjoy the game, then it would bring success to the sports (even success in sports). Everyone should have a mentality to realize "It is after all a game". The players should be reprimanded if they behave offensively.

The media is responsible for treating sports as a war among nations. As a true ambassador Anil Kumble has proven that he is a great leader. Finally, a more convincing victory for my favorite, the invincible Australia and their record of leveling 16 consecutive wins are shaded by controversies. The moral from the Second Cricket Test match is "We can never expect loyalty from persons who are in the brink of victory".

Wednesday, December 26, 2007

String - replaceAll method

String body = "How are you? Fine.. Who are you";

If you want to replace all 'are you?' in the body with 'is it?', then we can use replaceAll method in String class.
But the code won't work if you write like this
body = body.replaceAll("are you?", "is it?");

Because the replaceAll method treats the first parameter as a regular expression pattern. So the ? mark in the "are you?" is treated as a meta character and it finds no matches for the regular expression and replaces nothing.

To treat meta characters as ordinary character, enclose the "are you?" string within \Q and \E i.e "\Qare you?\E".

body = body.replaceAll("\\Qare you?\\E", "is it?");

The above code will replace all the matches of "are you?" successfully.