Tuesday, January 29, 2008

Lunchtime, Soup and a crying beggar

Have you ever seen a grown-up man cry? I've seen myself a few times... But that never invokes the kind of emotion that I experienced today...

I was stuck in office and had almost forgotten about lunch. I noticed around 2 PM and since this-thing-I-was-doing was interesting enough, I thought about getting a quick soup from Specialty's (it's one of the 15+ cafe/restaurants near my office) - and when I am in a hurry and not very hungry, I go there... Nice thick soups for around $3-5.

Anyway, so I was just outside when I saw a beggar (it's usual to see one in Seattle - and IMHO, more so in Seattle than in NYC). On an average, I usually see 1 beggar in a day (maybe because I travel back home around 9 or 10 at night? Maybe my opinion would have changed if I went home earlier, or if I was out around this time more regularly in NYC)
It has become so regular that my instinct has been honed to murmur something like "I am only carrying cards - no cash" with a sad-smile and walk away. I won't be lying if I say that I really don't have any cash on me 99% of the time.

But this guy was different - most guys are used to such a reply and give a damn about it. This guy asked me again, "Please if you have any part of a dollar - even a penny" and I could see the pain or the need in his eyes... But I was walking away so fast - my brain could not catch up to my heart.

Once I got the soup I saw this guy again from the window - he was crying now - and I could see the pain in his eyes now again, only much worse. I checked my wallet but I really did not have any cash at all. And I had just paid for the soup with my card. I wanted to help him but did not know how... Anyway, I was still not so emotionally charged as I would be 2 minutes from then and so, started back to the office...

Just when I was about to enter through the door, I HEARD him cry... yes - he was crying loudly now... I felt so bad I stopped and looked back... I felt like giving him the soup I had with me... But before I realized he was already walking away.

Once in the elevator, I felt this sudden depressive emotion - man it was an awful feeling. I wish you never have to see that face or hear that cry/sob - of a grown man in real (emotional) pain.

I remember giving away $20 to a stranger in Jersey City one day - and earning a lot of flak from my friends... But I said it then, and I say it now, this guy looked like he needed the soup/$20 much more than I did.

I know (or at least, I perceive, like most of us) that most of the beggars are well-capable of acting. But what if this guy was not acting?

All this happened in a matter of 4-5 min, but left a lasting sad feeling in me. I know I cannot do anything for that man now but maybe putting this down in a blog will make me feel less guilty?

And a very un-important question - what the hell do I do with this soup now?

Thursday, January 24, 2008

Pluggable Storage Engines of MySQL

Came across a very nice feature of MySQL - thought to share it with you.
Well actually, it is one of the main reasons why MySQL is succeeding - so not really an obscure nice feature at all!!! In fact, very well known and appreciated by the community...

(MySQL is a GNU Public licensed Database - and FREEly available. You can go for enterprise option and get support too. Recently Sun bought MySQL!!!)

Anyway, coming back to the point - it has a concept of a Pluggable Storages Engine. So when you write the DDL for creating the table, you specify which engine should be used to store the table - like so:

CREATE TABLE IF NOT EXISTS MY_FUNKLY_TABLE (
MY_FUNKY_ID CHAR(4) NOT NULL,
FUNKY_DESCRIPTION VARCHAR(10) NOT NULL,
IS_IT_REALLY_FUNKY ENUM('Y', 'N') DEFAULT 'Y',

PRIMARY KEY (MY_FUNKY_ID)
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin
;

So what's the deal? Well you can specify whether you want the table to be stored in memory or actually in storage; you can kinda tell what it's used for - Archiving? Have BDB (BerkleyDB) type features!!! Different types of engines are MyISAM, InnoDB, BDB, Memory, Merge, Archive, Federated, Cluster/NDB, Other - read more about each type in the links given below...

Moreover, you can implement any engine (MyOwnEngine) and plug that into MySQL - cool ha?

The best part is a story I heard from someone recently - a table was taking up around 1.5 GB - after converting it to Archive engine, it became 47MB!!!
A 32 times reduction in space!!!

Yeah yeah yeah - I agree it depends on what sorta data was there in the first place - but still 32 times (3200% to put it differently :-)) is a lot man!!!

Read more at:
Wikipedia
An article about this from MySQL

Thursday, January 17, 2008

Betting on weather


There was the Amazon Developer Conference last 2 days (Jan 16th and 17th ' 2008) - it's yearly event... Among others was Tim O'Reilly presenting "The O'Reilly Radar" - basically talking about the new things in the internet/tech space!!!

I hope to write more about it and the other talks... but before that I have to tell you about this idea that I loved a lot: www.weatherbill.com

This thing startled me... It's like an insurance on weather... on top of that... you can bet on the weather and if you win they pay you!!!
Go to the site and try the quoting thing. You put a condition (like I am saying it's going to snow above 5 inches each day between 1/27 and 1/29 at Zip Code 07310 - if that happens you pay me $10 a day!!!)

Now it takes your details and uses its own weather predicting algorithm (at the minimum I would assume it to be very very complicated) and gives you a quote - you buy that quote and if it really snows above 5 inches each day in that period you get paid)... I am sure you got the analogy - it's like an Option - but on weather!!!

That and much more - go to the site and read blogs about it!!!

BTW: Started by an ex-google guy... :-)

More to come - watch this space...