Home

Sat, Nov. 21st, 2009, 11:07 pm
C

Came across some nice macro in C..

#define COMPARE(x, y) (((x) > (y)) - ((x) < (y)))
#define SIGN(x) COMPARE(x, 0)

And... how to get string length faster:
http://tsunanet.net/~tsuna/strlen.c.html

Wed, Sep. 2nd, 2009, 09:50 am
traffice blues

How do you choose best possible path from home to office? Traveling salesman problem is nothing in front of this.

My heuristic solution is as follow:
If (traffic == very sparse)
choose the route with least number of traffic signals
Else if (traffic == very dense)
choose the route with most number of traffic signals
Else if ((traffic == jam) && (road == blocked))
Work from home!

Thu, Aug. 20th, 2009, 10:21 am
Guerrilla marketing

Now a days everyone is trying out unconventional ways of marketing. We have seen Cadbury and Pureit making a move with that.
Cadbury's new famous campaign about "Aaj pehli taarikh hai" and Pureit's "Ek Karod Rs aapke". Both tried unconventional paths and got decent visibility.

Problem with guerrilla marketing is that your competitor can turn missile against you. Thats what happened here.

Munch chocolate came up with "you can eat this chocolate without worrying about date. Its cheap, its tasty!"

AquaSure came with "chlorine and bad-taste water" against Pureit.

More details here: http://en.wikipedia.org/wiki/Guerrilla_marketing
http://marketingpractice.blogspot.com/2008/10/best-marketing-practice-guerrilla.html

Tue, Aug. 4th, 2009, 12:43 pm
Missing numbers..

You have an Array of N numbers. It contains positive integers from 1 to N+2 with two numbers missing from the list. Array is not in sorted order. Find these two numbers.

Important aspects to consider is time and space requirement.

Wed, Mar. 4th, 2009, 02:46 pm
google blues..

I have been observing steady decline in google products.
specially in gmail, picasa, orkut etc.
One such specimen here

Sat, Feb. 14th, 2009, 04:41 pm
question time ..

The FBI has surrounded the headquarters of the Norne corporation. There are n people in the building. Each person is either an engineer or a manager. All computer files have been deleted, and all documents have been shredded by the managers. The problem confronting the FBI interrogation team is to separate the people into these two classes, so that all the managers can be locked up and all the engineers can be freed. Each of the n people knows the status of all the others. The interrogation consists entirely of asking person i if person j is an engineer or a manager. The engineers always tell the truth. What makes it hard is that the managers may not tell the truth. In fact, the managers are evil geniuses who are conspiring to confuse the interrogators.

1. Under the assumption that more than half of the people are engineers, can you find a strategy for the FBI to find one engineer with at most n-1 questions?
2. Is this possible in any number of questions if half the people are managers?
3. Once an engineer is found, he/she can classify everybody else. Is there a way to classify everybody in fewer questions?

Tue, Oct. 21st, 2008, 04:50 pm
RBS with sachin..

RBS is trying to enter global financial service market since quite a while now.
Being one of the oldest bank in the world, they are well poised in Scotland and UK in general. Their current image is more of national bank than global institute.

RBS entered India with Sachin as brand ambassador, advertisement here: http://in.youtube.com/watch?v=lX9MloTRndM
They have hogged all business channel advt. time along with cricket series.
When I first saw the advertisement, I though its reid and taylor :P
In the end, people still keep wondering whats the ad is all about.

Also, See the timing they have choose in the middle of financial crisis. People are keeping all the money close to their heard and scared from many national (and reliable bank). it would be really hard to convince people to invest in new name at this time.

It would be interesting to see how it goes..

Thu, Oct. 16th, 2008, 02:58 pm
google calendar?

This may sound like wake-up alarm for G!
I have observed some problem with google calendar reminders.
These days, it does not send me email reminder at all!
I missed couple of deadlines and searched for some alternatives.
Found this http://www.rememberthemilk.com/, seems to be cool thing.
The only pain is, I have to migrate plenty of things from google. Lets see how it goes..

Sat, Oct. 4th, 2008, 03:25 pm
The sea of Gold Memories!

Too good..
NOTE: he just 12 years old!

Thu, Oct. 2nd, 2008, 06:38 pm
Upcoming...

Found this pretty interesting:
http://upcoming.yahoo.com/

Very well designed and active groups there.
Way to go.. Y!

Mon, Sep. 29th, 2008, 07:54 pm
Down but not out


Down but not out
Originally uploaded by Ashish T
Population..
Too many people..

Mon, Sep. 29th, 2008, 07:51 pm
so many crystal balls!!

Found it on flickr..
Too good to describe..

Loved it just like that..

Mon, Aug. 18th, 2008, 07:50 pm
3

Lots of things are ending after 3 long year.

Federer losing his Rank-1 after 237 weeks :O
I finished my Master after 150+ weeks :) and joining corporate world.
changing fields from wireless to database :|

Many more to follow..

Tue, Jun. 24th, 2008, 08:19 pm
soappy affair

Found this in one forward.
Really funny.
Read fully.

---------------------------------------------


What to Do With Hotel Soap

The following letters are taken from an actual incident between a London hotel and one of its guests. The Hotel ended up submitting the letters to the London Sunday Times!

Dear Maid,

Please do not leave any more of those little bars of soap in my bathroom since I have brought my own bath-sized Dial. Please remove the six unopened little bars from the shelf under the medicine chest and another three in the shower soap dish. They are in my way.

Thank you,
S. Berman

Dear Room 635,

I am not your regular maid. She will be back tomorrow, Thursday, from her day off. I took the 3 hotel soaps out of the shower soap dish as you requested. The 6 bars on your shelf I took out of your way and put on top of your Kleenex dispenser in case you should change your mind. This leaves only the 3 bars I left today which my instructions from the management is to leave 3 soaps daily. I hope this is satisfactory.

Kathy,
Relief Maid

Dear Maid - I hope you are my regular maid.

Apparently Kathy did not tell you about my note to her concerning the little bars of soap. When I got back to my room this evening I found you had added 3 little Camays to the shelf under my medicine cabinet. I am going to be here in the hotel for two weeks and have brought my own bath-size Dial so I won't need those 6 little Camays which are on the shelf. They are in my way when shaving, brushing teeth, etc. Please remove them.

S. Berman

Dear Mr. Berman,

My day off was last Wed. so the relief maid left 3 hotel soaps which we are instructed by the management. I took the 6 soaps which were in your way on the shelf and put them in the soap dish where your Dial was. I put the Dial in the medicine cabinet for your convenience. I didn't remove the 3 complimentary soaps which are always placed inside the medicine cabinet for all new check-ins and which you did not object to when you checked in last Monday. Please let me know if I can of further assistance.

Your regular maid,
Dotty

Dear Mr. Berman,

The assistant manager, Mr. Kensedder, informed me this morning that you called him last evening and said you were unhappy with your maid service. I have assigned a new girl to your room. I hope you will accept my apologies for any past inconvenience. If you have any future complaints please contact me so I can give it my personal attention. Call extension 1108 between 8AM and 5PM. Thank you.

Elaine Carmen
Housekeeper

Dear Miss Carmen,

It is impossible to contact you by phone since I leave the hotel for business at 7:45 AM and don't get back before 5:30 or 6PM. That's the reason I called Mr. Kensedder last night. You were already off duty. I only asked Mr. Kensedder if he could do anything about those little bars of soap. The new maid you assigned me must have thought I was a new check-in today, since she left another 3 bars of hotel soap in my medicine cabinet along with her regular delivery of 3 bars on the bath-room shelf. In just 5 days here I have accumulated 24 little bars of soap. Why are you doing this to me?

S. Berman

Dear Mr. Berman,

Your maid, Kathy, has been instructed to stop delivering soap to your room and remove the extra soaps. If I can be of further assistance, please call extension 1108 between 8AM and 5PM.Thank you,

Elaine Carmen,
Housekeeper

Dear Mr. Kensedder,

My bath-size Dial is missing. Every bar of soap was taken from my room including my own bath-size Dial. I came in late last night and had to call the bellhop to bring me 4 little Cashmere Bouquets.

S. Berman

Dear Mr. Berman,

I have informed our housekeeper, Elaine Carmen, of your soap problem. I cannot understand why there was no soap in your room since our maids are instructed to leave 3 bars of soap each time they service a room. The situation will be rectified immediately. Please accept my apologies for the inconvenience.

Martin L. Kensedder
Assistant Manager

Dear Mrs. Carmen,

Who the hell left 54 little bars of Camay in my room? I came in last night and found 54 little bars of soap. I don't want 54 little bars of Camay. I want my one damn bar of bath-size Dial. Do you realize I have 54 bars of soap in here. All I want is my bath size Dial. Please give me back my bath-size Dial.

S. Berman

Dear Mr. Berman,

You complained of too much soap in your room so I had them removed. Then you complained to Mr. Kensedder that all your soap was missing so I personally returned them. The 24 Camays which had been taken and the 3 Camays you are supposed to receive daily. I don't know anything about the 4 Cashmere Bouquets. Obviously your maid, Kathy, did not know I had returned your soaps so she also brought 24 Camays plus the 3 daily Camays. I don't know where you got the idea this hotel issues bath-size Dial. I was able to locate some bath-size Ivory which I left in your room.

Elaine Carmen
Housekeeper

Dear Mrs. Carmen,

Just a short note to bring you up-to-date on my latest soap inventory. As of today I possess:

* On the shelf under medicine cabinet - 18 Camay in 4 stacks of 4 and 1 stack of 2.
* On the Kleenex dispenser - 11 Camay in 2 stacks of 4 and 1 stack of 3.
* On the bedroom dresser - 1 stack of 3 Cashmere Bouquet, - 1 stack of 4 hotel-size Ivory, and 8 Camay in 2 stacks of 4.
* Inside the medicine cabinet - 14 Camay in 3 stacks of 4 and 1 stack of 2.
* In the shower soap dish - 6 Camay, very moist.
* On the northeast corner of tub - 1 Cashmere Bouquet, slightly used.
* On the northwest corner of tub - 6 Camays in 2 stacks of 3.

Please ask Kathy when she services my room to make sure the stacks are neatly piled and dusted. Also, please advise her that stacks of more than 4 have a tendency to tip. May I suggest that my bedroom window sill is not in use and will make an excellent spot for future soap deliveries. One more item, I have purchased another bar of bath-sized Dial which I am keeping in the hotel vault in order to avoid further misunderstandings.

S. Berman

Sat, Jun. 7th, 2008, 10:04 pm
Same ol' rain

Its the time of year in mumbai which was eagerly waited by everyone.
We had season's first rain this week and If we believe weather department, its pre-monsoon shower :O
Actual monsoon will start from 10th.

Lots of traveling this month. Few pics from new bangalore airport.





Looks good. Isn't it?

Common airport for domestic as well as international  flights.
duty free shopping in departure area (very similar to heathrow)
No separate scanning for check-in baggages.

Its almost 55km from city. It took me more than 3 hours to reach my place.
Thankfully, I had cab pick-up otherwise, it would have been big pain.

Wed, May. 14th, 2008, 03:49 pm
IPL T20

T20 fever continues, as Vijay Mallya says, there is a corporate side to it.
CEO sacked, owner is big mouth and captain is helpless :O
God bless Royally challenged Bangalore side.


As we are nearing to end, most of the semi-finalist are fixed. Last one spot and plenty of takers. Interesting !!

We had our share of IPL last week in Mumbai.
DY Patil stadium for M.I. vs R.R.
Match was disaster but we had fun.

Tue, Apr. 22nd, 2008, 08:34 pm
Two Rings to Bind Him

Found this in flickr just like that.
Interesting shape for both the rings.
It might be called girly in India but not there.

Mon, Apr. 21st, 2008, 04:51 am
Backup saves life

And your code as well !

Almost last whole month was jam packed with codesode for MTP. Being student, I don't care much about backup of code, versioning and all that. Once a while we take backup, called MVS. I mean, manual versioning system :P

Well, my requirements are simple:
1. I don't want to loose my code just because of disk crash/ machine failure.
2. If I get little bit of versioning, it would be helpful to rollback if required.

One fine day, almost a week ago, one machine was down.
Fortunately, we had CVS copy weekly to backup server; and MVS copy plenty of time :)
The lost code was not more than 5-10 lines (which wasn't CVSed :|)

Plenty of new things around; more on that later :)

Sun, Feb. 24th, 2008, 09:11 pm
Shatabdi experience..

Last week, I was coming from Ahm-Mumbai Shatabdi. As my luck was good (!!), got the coach C-2. That was the coach having small TV screens in front of you. It just remind me Kingfisher/British Air flights :D

Apparently, Indian rail has started this service as pilot project and to get some feedback from aam junta (read us). While 3rd party contract was given to some XYZ company, person came in the coach, inserted old-looking video cassette (Yes, it was that old VCR type); small screens started to blink like dainty gadget.

Ultimate aim of this might be to get good advertisement for IR and free(?) entertainment to travelers, none of them has been achieved though. XYZ company could only convince 3 parties to agree for advertisement while they had very little entertainment to offer.
We saw:
1. Na tum jaano na hum (with ad break every 5 mins, same 3 parties advertisement)
2. Some sa-re-ga-ma type reality show for kids
3. Sreeman Sreemati (of old DD-2 days)

As most of us staring at TV and figuring out that how can we switch it off, it turns out that you can't!

There was no power to keep laptop battery alive but (TV) show must go on :(
Anyway... My suggestions ..
1. Give few options to users (atleast 3-4 channels, and option to switch off! )
2. Don't repeat same advertisement within 15 minutes. It irritates lot..
3. Something like video on demand would work really well.
4. Any plan for live broadcast ? (like kingfisher)  

Thu, Jan. 3rd, 2008, 01:30 am
Eternal Moonshine of the Simpson Mind :P

saw this movie.
How can somebody write such story?
Just watch first 15 minutes and its kinda..  all sci-fi fiction around..
Should have read this before watching movie.


PS: Don't even bother to watch it without subtitles :P

20 most recent