Thinking aloud...
...always I have a strange sensation when I read something that I had written some time previously...I recognize it ofcourse, but not wholly; it seems almost that I was reading some familiar piece by another, who was near to me and yet who was different...perhaps that is the measure of the change that has taken place in me - (copied from preface of the book 'Discovery of India')
Thursday, December 05, 2024
Wednesday, December 04, 2024
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,
The anklets of the wraith ghost jingled, or was it just the cicadas,
As the jasmine, champaka and parijata bloomed with fragrance,
Three ripe mangoes, cut and frozen well before monsoon,
Disappeared into the midnight mystery.
ಮುಂಜಾವಿನಿಂದ ಸುರಿದ ಜಡಿಯ ಮಳೆ ನಿಂತಿರಲು
ತೆಂಕಣದಲಿ ತಿಂಗಳ ಬೆಳಕು ಮೋಡದಿಂ ತಿಣುಕುತಿರಲು
ಜೀರುಂಡೆಗಳು ಮೋಹಿನಿಯ ಗೆಜ್ಜೆಯ ಸದ್ದು ಮಾಡುತಿರಲು
ಮಲ್ಲಿಗೆ ಸಂಪಿಗೆ ಜಾಜಿ ಪಾರಿಜಾತಗಳರಳಿ ಪರಿಮಳ ಪಸರಿಸುತಲಿರಲು
ಮುಂಗಾರಿಗೆ ಮುಂಚೆಯೇ ಹಚ್ಚಿ ಮಂಜಿನಲ್ಲಿ ಬಚ್ಚಿಟ್ಟ
ಮೂರು ಮಾವಿನ ಹಣ್ಣುಗಳು ಮಧ್ಯರಾತ್ರಿಯಲ್ಲಿ ಮಾಯವಾದವು
Wednesday, December 05, 2007
Google and mobile phones
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
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.
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.
"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
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
Friday, February 17, 2006
HOLI
Sambhavami Yuge Yuge
Yada Yada hi Food-asya Glarnir bhavathi Fridga Abhyutanam Taste Sambhavami Chefa Chefa
-
This has been bugging me for some time now... The first thing you do when inserting/retreiving from hash table is to calculate the hashCod...
-
Five of us kunta , subbu , dinga, biter and myself left for brahmagiri last friday afternoon with banglaore still limping back to normalcy a...
-
The festival of colors is here...if u don't believe me..come down to bangalore... The Trees in bangalore have begin to shed their leave...