Thursday, December 05, 2024

Sambhavami Yuge Yuge

Yada Yada hi Food-asya

Glarnir bhavathi Fridga

Abhyutanam Taste

Sambhavami Chefa Chefa

Wednesday, December 04, 2024

Priceless

Haircut - Rs.60

Oil Massage - Rs.60

Vivid Bharati Bhule Bisre Geet in the background - Priceless

    



Saturday, July 20, 2024

Mangoes in Monsoon (ಮುಂಗಾರಿನಲ್ಲಿ ಮಾವು)

ಮುಂಜಾವಿನಿಂದ ಸುರಿದ ಜಡಿಯ ಮಳೆ ನಿಂತಿರಲು

As the torrential rain that poured since dawn ceased,

ತೆಂಕಣದಲಿ  ತಿಂಗಳ ಬೆಳಕು  ಮೋಡದಿಂ ತಿಣುಕುತಿರಲು

And the full moon peaked through the clouds from the southern sky,

ಮಲ್ಲಿಗೆ ಸಂಪಿಗೆ ಜಾಜಿ ಪಾರಿಜಾತಗಳರಳಿ ಪರಿಮಳ ಪಸರಿಸುತಲಿರಲು
 As the jasmine, champaka and parijata  bloomed with fragrance,

ಮೋಹಿನಿಯ ಗೆಜ್ಜೆಯ ಸದ್ದು ಜೀರುಂಡೆಗಳು ಮಾಡುತಿರಲು

 The anklets of the wraith ghost jingled, or was it just the cicadas,


ಮುಂಗಾರಿಗೆ ಮುಂಚೆಯೇ ಹಚ್ಚಿ ಮಂಜಿನಲ್ಲಿ ಬಚ್ಚಿಟ್ಟ ಮೂರು ಮಾವಿನ ಹಣ್ಣುಗಳು ಮಧ್ಯರಾತ್ರಿಯಲ್ಲಿ ಮಾಯವಾದವು 

Three ripe mangoes, cut and frozen well before monsoon, Disappeared into the midnight mystery.

 


Wednesday, December 05, 2007

Google and mobile phones

Some time in summer this year Vint Cerf came to bangalore and addressed the public.

People distributed small white cards to the audience who wanted to ask any questions to Vinton. I too wrote my question. In the end when Vinton finished his presentation and started to listen to the first question from the audience being read out by his assistant...I started asking the same question in way that made the assitant's voice my echo, loud enough so that some of my neighbours could hear it....but not louder, and with a big smile on my face.
"The world is flat today because of the internet(read as Vinton). But still in a country like india, there is a huge digital divide...what can we do?"

Vint said something to the effect of "Mobiles can reach more people than computers".

Wednesday, July 05, 2006

Hash table lengths and prime numbers

This has been bugging me for some time now...
The first thing you do when inserting/retreiving from hash table is to calculate the hashCode for the given key and then find the correct bucket by trimming the hashCode to the size of the hashTable by doing hashCode % table_length. Here are 2 statements that you most probably have read somewhere
  • If you use a power of 2 for table_length, finding (hashCode(key) % 2^n ) is as simple and quick as (hashCode(key) & (2^n -1)). But if your function to calculate hashCode for a given key isn't good, you will suffer from clustering of many keys in a few hash buckets.
  • If you use prime numbers for table_length, hashCodes calculated could map into the different hash buckets even if you have a slightly stupid hashCode function.
Ok, but why? Today I think I found out why...if u think I'm wrong put in a comment, at least for the sake of others reading this blog.

If suppose your hashCode function results in the following hashCodes among others {x , 2x, 3x, 4x, 5x, 6x...}, then all these are going to be clustered in just m number of buckets, where m = table_length/GreatestCommonFactor(table_length, x). (It is trivial to verify/derive this). Now you can do one of the following to avoid clustering
  • Make sure that you don't generate too many hashCodes that are multiples of another hashCode like in {x, 2x, 3x, 4x, 5x, 6x...}.But this may be kind of difficult because you have to come up with a perfect hashCode function.
  • Or simply make m equal to the table_length by making GreatestCommonFactor(table_length, x) equal to 1, i.e by making table_length coprime with x. And if x can be just about any number then make sure that table_length is a prime number.
Update:
"Wangchun Li" pointed outed out in the comments to "CLRS theorem 31.20". Need to take a look at it.

Wednesday, April 19, 2006

Brahmagiri trek

Five of us kunta, subbu, dinga, biter and myself left for brahmagiri last friday afternoon with banglaore still limping back to normalcy after the riots. We had intially planned a overnight camp @ tadiandamol which didn't workout...for good as there were thunderstorms that night and we planned to carry only sleeping bags...no tents.
First stop @ Balmuri (we accidentally discovered we were close to this place) ...amazing place to enjoy water...and guess what... yours truly saved someone who was about to drown in filmi style (must confess he wasn't too far from safety although his family was panicky)...learned a lesson or 2 myself.

Evening@Balmuri...Every cloud has a silver lining



Halt for the night @ hunsur...almost zero sleep...woke up @4 in the morning and headed towards nagarhole.

Well if the forest dept wishes you a wild journey then you know what to expect right


Sunrise in nagarhole national park


Kunta @ the elephant camp


As Dinga said Deers in nagarhole are as common as dogs in bangalore


Drive thru' nagarhole


Start of trek near iruppu falls


Nice prose


The last mile before reaching the narimale camp at the top


Leech bite on my leg. Bloody leeches (no pun intended) have both a local anasthetic and anti-clogging agent in their saliva


Mahishaasura


Caves a top brahmagiri


A lone banana tree @ kerala-karnataka border


Bussss naga


A very good morning after a chilly night spent in fear of rats, leeches and tolerating subbu's innovative ways of snoring







Dinga's flying high


Blown away


Washing the dishes after cooking MTR puliyogare, noodles and bisibelebath using dry wood from the forest and water from streams


Mission Complete


Driving back to blr on the truly amazing mysore road


Me and kunta near a paddy field in mandya i guess

Dark nights