Friday, 10 April 2026

The beauty of mathematics : Shazam !


      (From LinkedIn post by Sofien Kaabar) 

You hold your phone up for 10 seconds. It tells you the exact song, the artist, and even the timestamp you're at in the track. That's not magic.

That's a 20-year-old paper by a guy named Avery Wang (Founder/Chief Scientist at Shazam and currently a Principal Research Scientist at Apple), and the math behind it is one of the cleanest ideas in all of computer science.

Sound is just a list of numbers. Your microphone records how loud the air is, thousands of times per second. Two recordings of the same song look completely different as raw numbers. Background noise, different volumes, different rooms. You can't match them directly.

So Shazam doesn't even try to match the raw sound.

Instead, it chops the audio into tiny 0.3-second slices and runs a mathematical operation (Fourier Transform)

Any sound is secretly just a bunch of pure tones layered on top of each other. The Fourier Transform pulls those tones apart and tells you exactly which frequencies are present and how loud each one is.

Shazam runs this on each 0.3-second slice, one after another. The "Short-Time" in Short-Time Fourier Transform just means you do it slice by slice, so you know not just which frequencies exist but when they were loud.

Stack all those slices side by side and you get a grid - time running left to right, frequency running bottom to top, brightness showing how loud each frequency is at each moment. This is called a spectrogram.

Then it throws away most of that grid. It keeps only the brightest point in each frequency band, per time window. What you're left with is a sparse scatter of dots - like a constellation map of the song's loudest moments.

For every "anchor" dot, Shazam looks at nearby dots and asks how far away they are in both time and frequency. Each relationship becomes a single code.

A 3-minute song produces roughly 10,000 of these addresses. Shazam pre-computes them for every song in their catalogue and stores it all in a lookup table.

When you Shazam something, your phone generates the same addresses from your noisy snippet and looks them up. If the same song keeps appearing, and the time offsets keep clustering at the same gap, that's your match.

The whole thing runs in under a second. Shazam doesn't search through 10 million songs. It looks up a hash.

That's an O(1) operation - the lookup time stays flat whether the database has 10 million songs or 100 million.

Source: Arin Verma

 

ये ! : सुधीर मोघे


येणारच तू भेटण्यास तर 
जिवलग प्रियकर होऊन ये 
धूसर स्वप्नील स्वरासारखा 
उत्कट आतुर होऊन ये 

क्षण क्षण चुंबित असता चालत 
सुंदर यात्रा जगण्याची 
त्या धुंदीतच अस्फुट घुमू दे 
साद तुझ्या हुंकाराची 

आस्वादाच्या शतधारांची 
शिरी बरसता  बरसात 
अमृतवेळी त्या कायेवर 
फिरव तुझा प्रेमळ हात 

नसानसातून वीज अनामिक अनिर्बंध खेळत असता 
मस्तकातील मत्त तुफाने दिशा नवी शोधीत असता 
दिसण्यापलीकडचे बघण्याचा असता डोळ्यांना ध्यास 
मिळता आनंदाच्या गीतां आर्त वेदनेची आस 

पापणीतूनी स्वप्न उतरते 
तसाच अलगद अवचित ये 
जगा न कळता .. मला न कळता ,,
स्वतः तुला हि नकळत ये ....

.......................................................................



Sunday, 5 April 2026

Kerala Sonnet : By Bachi Karkaria

This article was written in 'Times of India' in August 2018, when the state of Kerala was dealing with devastating floods .... 


‘Shall i compare thee to a sun-drenched beach … ?’ Alas it’s not the sun that’s done the drenching this monsoon of Kerala’s discontent. But why let the heart-wrenching images drown all that has made this state segue into our collective consciousness in so many ways, with so many lilting names? 

Let’s go with the flow – and a prayer for paradise regained.

Ayurveda, Alleppey, Arundhati Roy, aappam, Asin, Achutha Menon, Achuthanandan, AK Antony. Backwaters, Balu Nayar my friend, Bekkal beach, Bharananganam temple, Balamani Amma the ‘poetess of motherhood’, beef chilli fry, banana chips.

Chottanikkara devi, communists, cardamom plantations, Chemmeen the novel and the film, Cochin Jews, chatti pathiri the layered Ramzan specialty, Carnatic music, coconut  in  everything. Diaspora. Ernakulam, erachi varutharachathu the roasted mutton curry, pumpkin-lentil erissery if you’re ‘vejirreriyan’.

Floods. And prayers against them at Guruvayoor. Along with generous Gulf money.

Hill stations, houseboats, horoscope casting with fail-safe accuracy, hundred-percent literacy. Idukki, Idiyappam.

Kochi Biennale, Kottayam book-shops, Kasargod, Kollam, Kovalam, Kumarakom, Kozhikode, Kathakali, Kasavu saris in cream and gold, Kamala Das, KR Meera,  Kay Kay Menon.

Matrilineal, Malayala Manorama, Munnar, Malabar, Moplah, Mar Thoma Church, meen molee, Manu Joseph and Pillai. Mallu jokes. Namboodiripad, Nair women, nadan pattu dance, nadan kozhi roast, Neha Dhupia (yes, the same!), nurses, nuns once of gun-running infamy.

Onam, OV Vijayan, Oommen Chandy. Periyar, parota, Padma Lakshmi, puttu with or without kadala curry, palada payasam, puli inji the ginger-tamarind chutney, Parsuram whose remorseful axe heaved into the Arabian Sea gave rise to Kerala.

Rescue, relief, rehab, rebuild, rejuvenate.

Snake-boat races, Sabarimala, settu-mundu style of Namboothiri women, Shobana,

Shankar my efficient secretary, Shirodhara therapy, Sadhya rice meal. Thanjavur-Travancore, Tilottama of Raja Ravi Varma, Thiruvananthapuram nee Trivandrum, Thrissur.

Udvartana and ubtaan massages. Vaikom Mohammed Basheer, Vidya Balan, vastu vidya, Varkala beach. Waterfalls at Athirapalli, Palaruvi, Tusharagiri, Vazhachal.

No floods can submerge many-splendoured Kerala.

.....................

What gives life meaning ...

 From : 'Yes to life' by Victor Frankl 


It is not only through our actions that we can give life meaning — insofar as we can answer life’s specific questions responsibly — we can fulfill the demands of existence not only as active agents but also as loving human beings: in our loving dedication to the beautiful, the great, the good. 

Should I perhaps try to explain for you with some hackneyed phrase how and why experiencing beauty can make life meaningful? I prefer to confine myself to the following thought experiment: imagine that you are sitting in a concert hall and listening to your favorite symphony, and your favorite bars of the symphony resound in your ears, and you are so moved by the music that it sends shivers down your spine; and now imagine that it would be possible (something that is psychologically so impossible) for someone to ask you in this moment whether your life has meaning. I believe you would agree with me if I declared that in this case you would only be able to give one answer, and it would go something like: “It would have been worth it to have lived for this moment alone!

Those who experience, not the arts, but nature, may have a similar response, and also those who experience another human being. Do we not know the feeling that overtakes us when we are in the presence of a particular person and, roughly translates as, The fact that this person exists in the world at all, this alone makes this world, and a life in it, meaningful.

................................................. 


HOW TO BE A DOG - Andrew Kane


If you want to be a dog, first you must learn to wait. 
You must wait all day until somebody returns, and if somebody returns late, you
must learn to wait until then. 
Then you must learn to speak in one of the voices available to you, high and light or mellow thick and
low or middle-range and terse. 
Whichever voice you learn to speak, you will meet somebody who does not like you because of it, they
will be wary or annoyed or you will remind them of something or someone else. 

Once you have learned to speak you must learn not to speak unless you absolutely must, or to speak as much as you feel you must, regardless of how many times you are told to stop, or sit, or placed behind a door—this will depend on what kind of a dog you want to be. 

And indeed there are many kinds. It may not feel as though you get to choose, and that too is a kind of dog. 

Next you must learn to relinquish all control over everything you might wish to control. 
You must learn to prefer to be led about by the neck on a piece of string, or staked to a neglected lawn by a length of chain. 

You must learn, once you have sampled the freedom of a life without a chain, that it is better
to return and be chained again. 

Or you may learn that it is not—a fugitive is also a kind of dog. 

Of course you must learn to love, to love always and love entirely and to be wounded by nothing so much
as the violence of your own love. 

You must learn to be confused but never disappointed by a deficiency of love. 
You must give up your children and not know why. 

You must lose yourself wholly in activity; you must never feel an itch that you do not scratch. 

You must learn how to wait at the foot of the bed and hope, silently, that somebody is drunk
enough or lonely enough to invite you up, and you must learn not to show
your excitement too much or overplay your hand. 

If you want to be a dog, you must learn to believe that you are not in fact a dog at all.

Saturday, 4 April 2026

From an article on Dr. Baba Adhav : By Dr. Anil Awchat

 Dr. Baba Adhav, founder of 'Hamal Panchayat' and pillar of Maharashtra's social reforms and labor movement passed away in December 2025. 

.........................................................................................................

सुनंदाच्या दवाखान्याच्या मागची खोली बाबांची. तिथे फोन होता. वस्तीतले अनेक गोरगरीब गाऱ्हाणी घेऊन यायचे. वस्तीतल्या लोकांच्या एक ना अनेक तक्रारी. पोटमाळ्यावरचा भाडेकरू मालकाने त्याला कारण न देता हुसकावून लावलं असं सांगायचा. त्यांचं म्हणणं ऐकून बाबा उसळून उठायचे. थेट त्या मालकाला भेटून यायचे. प्रश्नाचा निचरा केल्याशिवाय ते स्वस्थ बसायचे नाहीत. एकदा वस्तीतला एक माणूस सीरियस झाला. त्याला ससूनला न्यायला ॲंब्युलन्स मिळेना. गाड्या तर कुणाकडेच नव्हत्या. तो भाग हमालांचा आणि गोदामांचा. रस्त्याच्या कडेला पोती वाहणारी हातगाडी उभी होती. बाबांनी त्यावर या माणसाला निजवलं आणि ते स्वतः हातगाडी ओढू लागले. ते पाहून बाकीचे धावून आले. त्यांनी बाबांना बाजूला करून त्या माणसाला ससूनला पोहोचवलं.
बाबा महाराष्ट्रात कुठेकुठे एसटीने फिरायचे. रात्री - अपरात्री यायचे जायचे. त्यांच्या पत्नी शीलाताई नर्स होत्या. त्या सकाळी उठून कामाला जात. त्यानंतर बाबा घराच्या चौकात कपडे धूत बसायचे. धुऊन दोऱ्यांवर वाळत टाकलेले ते शुभ्र कपडे मला अजूनही आठवताहेत. संध्याकाळी दवाखान्यात आल्यावर पाहावं तर बाबांची वळकटी पुन्हा तयार. आदल्या दिवशी कुठून आले तर अमरावतीहून. आता कुठे चालले तर निपाणीला. तिथल्या बायकांचं काही प्रकरण उद्भवलंय, ते जाऊन समजून घ्यायला हवं असं म्हणत. सगळ्या रातराण्या यांना प्रसन्न. ते कुठूनही येऊन कुठेही जाऊ शकत. त्या वेळी सगळ्या गावांमध्ये थेट गाड्या तरी होत्या का ? कसलं काय ! पण या गाडीने चौफुल्यापर्यंत जाऊ, तिथे दुसरी गाडी पकडू, असं सहज म्हणत. एसटी गाड्यांची अवस्था तर अशी की प्रवासात पाठ खिळखिळी होऊन जाई, पण बाबांच्या चेहऱ्यावर त्याचा मागमूसही नसे. जणू पुण्यातच एका ठिकाणाहून दुसऱ्या ठिकाणी चालल्यासारखे ते गावांची नावं घेत…
मार्केट यार्डात हमाल भवन उभं आहे. तीन मजली. मजबूत. ते कसं उभं राहिलं माहितीय ? बाबा तुरुंगात असताना हमालांनी ते बांधून घेतलं. प्रत्येकी 250 रुपये वर्गणी काढली. हे हमाल भवन म्हणजे त्यांच्या अस्मितेचं प्रतीक. इतर ठिकाणच्या युनियन आपण बघतो. पण इथे छोटंमोठं कुणी नाही. उपाध्यक्ष असलेले मानकर रोज 100 किलोचं पोतं उचलून हमाली करतात. तसेच सगळे पदाधिकारी…

From 'Archetypal Dimensions of the Psyche' : Marie-Louise von Franz



The inner development process, which leads to the realization of this fourth stage, Jung called the individuation process. It involves the development of what is known as a mature personality, “a well-rounded psychic whole that is capable of resistance and abounding in energy,” which is capable of choosing its own path and self-reliantly remains true to its own inner law.
Especially in times of collective neurosis, the existence of such mature people is of crucial importance. Also in this stage, according to Jung, only dreams can point the way, for this development follows a purely inner bent or is determined by destiny.
Dreams that are an index of the individuation process have, as we shall see, a strange religious or mythological character, for after all it is really religions that have served humanity in the discovery of inner meaning from time immemorial.
Today, however, there are all too many people for whom the existing religions are no longer capable of providing any meaning and who are also not satisfied by the purely extraverted worldview of contemporary science or by the intellectual word games of modern philosophers.

It is at moments like these that many people are called by an inner voice and find themselves compelled to set forth on an inner quest.

......................................