Wednesday, March 13, 2024

How GenAI models like ChatGPT will end up polluting knowledge base of the world.

Around nine years ago, around the PI day, I wrote a blog post about an ancient method of remembering digits of pi. Here is the link to blog post.

Here is the operative part of the blog post.

The code is as follows.

123456789
क ख ग घ ङ च  छ  ज  झ 
ट ठ ड ढ ण त थ द ध 
प  फ  ब  भ  म  
य  र  ल  व  श  ष  स  ह  क्ष  

With the above key in place, Sri Bharathi Krishna Tirtha in his Vedic Mathematics gives following verse.
गोपी भाग्य मधुव्रात  श्रुङ्गिशो दधिसन्धिग  |
खलजीवित खाताव गलहालारसंधार |
If we replace the code from the above table in the above verse, here is what we get.
31 41 5926 535 89793
23846 264 33832792
That gives us 

Today, I asked ChatGPT this question.



If you look at the details explanation provided by ChatGPT, it is completely wrong. What I picked up is from a book on the topic. Once more and more such content floods internet, it will become extremely hard to decipher what is right and what is wrong. Furthermore even academic text being written in future would consist of ChatGPT created stuff.

Unles GenAI can provide traceability to the source material, I don't think it is worth giving the attention that it is being given.

Friday, January 19, 2024

How large social media companies are compromising democracy

Here is my rant about how Google's of the world are compromising democracy around the world. Once you get out of US, they pretty much bend over to the whims of the local governments. Why do I say that? Here is the evidence.

As a rule, I don't subscribe to anybody on YouTube and just search and watch videos of people that I am interested in. Once I watch few videos, the recommendation algorithm starts suggesting me videos from those people.

When Rahul Gandhi did the first instalment of his Bharat Jodo Yatra back in 2023, I used to watch it pretty much everyday for probably 10-20 minutes. I always watched it on his channel.

Off late I have observed that his channel never shows up in my recommendations. Have a look at this screenshot below. 



This is the set of recommended videos by YouTube algorithm to my account. You can see one video from today's yatra but that is from Bharat Jodo Yatra account, not from Rahul Gandhi account.

I can search for Rahul Gandhi's channel or his name and then I can see all the videos.

I am not sure, if this is by design or mistake, but it does look iffy to me. 

Thursday, April 28, 2022

I will not forget

Today completes one year of that fateful day when my father passed away. He would have been 80 years few months later.

The problem is not that my father passed away but the events leading up to that and the complete collapse of everything at that time.

My father was based in Bhopal, last thirty odd years of his life he lived there. I am based in South India. That month of 2021 was hell in the country. So, I was not present when all this happened.

21st April was Ram Navami, I called him that day and he was coughing. I requested him to get a COVID test done. As if he knew, he said to wait for Ram Navami and then he will get that done. 

21-April by end of the day his oxygen levels were in 70s. We started looking for a hospital. There was a derelict hospital near our home which was converted to a COVID care center that same day. Fortunately, they had a bed empty, so we got him admitted.

Doctors treated him at this COVID care center till 27-April. He was fine, but the oxygen was not in control. On 27th the doctor told us, "We are doing everything we can, but if you can find a better hospital, you can shift him there". 

We took it as a signal that the doctor at COVID care has done everything he could, and this was his nudge to us to shift him somewhere.

As we looked around for a bed in hospital, everybody knowledgeable told me, all the beds in good private hospitals are reserved for politicians. We asked couple of other doctors whom we knew, and they said that they could not take any more patients because all night they were running around to arrange for oxygen cylinders. The oxygen that they had gotten is barely sufficient for existing patients so they would not suggest we take our father there. The oxygen can run out any time and then it would become exceedingly difficult.

Finally, we found a bed in Hamidia Hospital, which is the primary government hospital in Bhopal. We were told to show up in next hour otherwise bed would go to somebody else.

My father at 2pm

From afternoon of 21-April 2021 till 28-April 2pm, none of our conversations with doctors would suggest anything was wrong. Even when we point out to them that oxygen levels were below normal, they would say, this happens and the feeling that we got that they were in control.

In the night of 28-April, around 10:00pm we received a call and were told that my father must be moved to an invasive ventilator, in the next half an hour we received another call that he had passed away.

During these times, everybody who was supposed to be representing an authority was absent. We would not hear anything from hospitals. COVID wards were like jails, you go inside and then you don't hear anything back. If you are lucky, you get cured and walk out or like my father, you die and you get a courtesy call, and the body is directly transferred to cremation ground.

There were many people doing excellent work. Most of these were without any authority. Some good Samaritans who were going out of their way to help fellow citizens. That makes we wonder, if people with no authority could do so much, if authority were doing its job, how the situation could have been salvaged.

So, yes, I blame anybody in a position of authority who could have helped this situation from getting worse for the mess during second wave of COVID. I still believe, this was a loss that was avoidable. We did not need extraordinary work from anybody. If only people just did their job. we would be in a better place.

Over the last year, I have tried to diagnose the reasons why authorities behaved the way they did. Every time I have come to same conclusion. A significant percentage of us citizens are so invested in making the government look good, we have stopped asking them the questions. We have started confusing governments for nations. That's why today, I don't see much hope going forward.


Thursday, December 16, 2021

As I complete 30 years in Industry

 Finally a career landmark has been achieved. Today I complete 30 years in this Industry. All my life I have been writing software of some or the other variety.

I started working for Bharat Electronics exactly 30 years on today's date, i.e. 16-December-1991. Although as per original career plans, I should have retired by now but that has not happened still it is a good time to look back at my career.

Joining BEL

I completed my graduation in June-1991 and was asked to join BEL on 16th December 1991 in Bangalore unit. We had three months of training and we were called probationary engineers till our training was completed. Once we completed our training, we were designated Deputy Engineer and posted to our units which in my case was BEL Kotdwara in the foothills of Garhwal mountain ranges. The PEs training in BEL was an education in itself. All of four years our colleges treated us like adults and suddenly the company that we were working for wanted to treat us like children again. 

BEL Kotdwara

I, along with the group of other 5 engineers from the batch, joined BEL Kotdwara on 11th March 1992. I still remember it was one day before the festival of Holi. BEL Kotdwara was fun, regular visits to Siddhabali, Lansdowne. Suddenly all the YouTube Vloggers have discovered Lansdowne which used to be our backyard and we were visiting this sleepy little settlement whenever we wanted. We even drove our bikes to Dehradun, Mussoorie once. On 28th of September, 1994, I left BEL to join Motorola India Electronics Ltd. in Bangalore. 

Motorola India Electronics Ltd., Bangalore

In the later part of 1994 the area around our factory was engulfed in the agitation for formation of Uttarakhand. We had some factory shutdowns as part of strikes. In one such strikes, we saw a walk-in advertisement from Motorola. We did not even have a resume. But somehow we hitchhiked and reached Delhi on a overnight bus trip and attended interview with Motorola in Taj hotel. They made an offer and I joined MIEL on 3rd of October, 1994 in Bangalore at their office on St. Marks Road. The building was called "The Presidency". Since the building was full, after joining and training I was sent to work at a rented facility at Manipal Center at the junction of Dickenson Road and Cubbon Road. In a few months the new facility of Motorola, called The Senate, was ready at Ulsoor Road. We moved there and I worked out of that facility for next almost 10 years. Eventually, Motorola built another facility in C. V. Raman Nagar in Bagmane Tech Park. We moved to that facility on 27th February 2004. I worked out of that facility till 2010.

Leaving Motorola

In June 2010, Motorola decided to close the group (Enterprise Applications Research Labs, Applied Research Center, Bangalore) in which I was working and I was one of the causalities of that decision. Anyway, it was time to leave the place. Motorola was a good employer and a decent severance was paid to us at that time.

Entrepreneurship

In July 2010, I joined the startup with a few of my friends, to build a product in the telecommunication infrastructure space. We built a prototype, demonstrated to few tier-1 operators across the world and then we were acquired by Movik Networks in October 2010.

Movik Networks

I joined Movik Networks as part of that acquisition, did some interesting work for the next few months and finally left them on 31st March 2011. This experiment had failure written all over it. We got kind of acquihired into the company even before that phrase was popular. I could not tolerate this place for even six months and after handing over technology that I had built, I left the place.

In April 2011,   I joined Hewlett-Packard in Bangalore.

Hewlett Packard

I worked at HP in the storage group. We built a scale-out file system for large storage systems. The work in place was reasonably good but the politics of the place just got to me. I left in October 2014 after little more than three years in the place.

Oracle

I joined Oracle's cloud group and worked on Application PaaS. I found the company very suffocating for technical people. Even architecture documents were approved by managers there. So finally left the place after little more than one year.

Hubble Connected India Private Limited

Joined the company because they were running a cloud service that required a refresh and needed to be rearchitected to run at a much higher scale.  We built a brand new service, scaled it from a little over 100,000 subscribers to close to one million subscribers. Finally had a disagreement with the management and left the place.

Tesco

Joined Tesco in January 2018. The primary goal was to build a cloud based fulfilment service. We did one of the initial builds and then I left that place. As usual it did not seem a good place for somebody who was only interested in development technology.


Paypal India Private Limited

I joined Paypal India Private limited in the month of November 2019. As soon as I joined, I realised that I made a mistake. I was hired to re-architect the partner reporting system as a scalable system since the existing system was mostly based off Oracle. But I realised that there was so much resistance to that activity I found myself fighting battles everyday. Also the person who hired me, left before I joined and the new manager had different priorities. I left in less than six months.

Adobe India Private Limited

I joined Adobe i March 2020 just as COVID lockdowns started countrywide.

To summarise, it has been an interesting ride for the last 30 years. What is the most disappointing is the level of technology ownership in most of the Industry? I had expected that we would see more technology and product ownership with Indian industry, which does not seem to be the case. Hope things would improve in the next few years.


When I started working 30 years ago, I was of the view that I will not work as an employee for more than 25 years. That is one milestone that I have unfortunately missed. I have not been able to transition from a salaried job to either freelance consulting or build a company of my own. That is probably the biggest regret that I have as I complete 30 years.


In these 30 years, I also built on my education, acquired a post graduate in management from Indian Institute of Management, Bengaluru. A doctoral from Indian Institute of Management, Indore and a post graduate in Telecommunication and Software Engineering from Illinois Institute of Technology. 

One thing I am sure of, I hate being manager. In my whole career, I have only worked as full-time manager for one year and I have hated every minute of it.

Thursday, April 29, 2021

ॐ त्र्यम्बकं यजामहे सुगन्धिं पुष्टिवर्धनम् | उर्वारुकमिव बन्धनान्मृत्योर्मुक्षीय माऽमृतात्|


Like the year 2019, 2021 is turning out to be another year filled with grief. Last night my father passed away, another victim to this epidemic called SARS-COV-19. Two days before Ram Navami, when he complained of cough and cold,  I asked him to get tested and admitted to the hospital if required, he told me that he has to celebrate the birthday of Ram and then he will worry about it. He got tested and was COVID positive, but he took his day and celebrated Ram Navami before he got admitted to a COVID facility in Ayodhya Nagar on 22-April-2021.

When he got admitted, his SPO2 was in high 80s and the COVID facility kept him on standard COVID drug regimen. But his oxygen levels refused to improve. Even when on oxygen, it will never go above 80-81. So we thought we need to go to a slightly more specialised facility. Bed were difficult to come by in the city because of raging epidemic, we moved him to Hamidia Hospital which is the largest government hospital.

He got admitted on Tuesday let night, complained of low oxygen on Wed morning. Then they put him on non invasive ventilator. But by the end of day, we received a call that he has to be put on invasive ventilator.  I was in Bangalore, my brothers rushed to the hospital but before they could reach, he had passed away.

My dad was going to be 80 years old this October.

My dad was a remarkable man, he was the first person to get out of his village (Imilia distt. Sitapur), complete graduation and post graduation and then work with Indian Audit Department for whole of his life before retiring in the year 2000. He had a fulfilling life, travelled most of India, did things mostly on his own terms.

I remember growing up, during 70s and 80s, he was a pragmatic man. The right mix of idealism, religiousness and looking forward to a new day. During the days of 70s and 80s when we did not have television, I still remember, him and all of us brothers tuning into BBC World Service and listening to stuff happening across the world. The 83 cricket world cup, even though he was not a cricket person, but because India was winning, we stayed up listening to commentary on short wave radio.

 I remember his having deep discussions with my tuition teacher when Zulfikar Ali Bhutto was about to be hanged. We discussed what we will do if Skylab were to fall in our city. Those were really cherished times.

Sometime around 90s, he turned deeply religious. He had experiences that he could only explain by presence of all powerful, all mighty god. He had pretty much read all the scriptures and he was living his live according to what he believed his religion expects him to live as. With him around, festivals used to be elaborate affairs.

After my mother's passing away in 2019, he kind of became reserved. He was in a hurry to finish things in life. There were things that he wanted to do and he had a feeling that time was running out. He tried to finish as many things as possible. 

The recent image that I have in my mind of him was the trip that we made recently to Sanchi and Udaygiri caves. He was deeply curious about Sanchi Stupa and why it was built where it was built. One of his unfulfilled wish was to visit Amarkantak. He had visited most of the country but had not been to many places in MP. He wanted to correct that mistake. Alas, that was not to be.




Papa, Thank you for everything.

ॐ त्र्यम्बकं यजामहे सुगन्धिं पुष्टिवर्धनम् | 
उर्वारुकमिव बन्धनान्मृत्योर्मुक्षीय माऽमृतात्|



Wednesday, March 24, 2021

Letter from Nehru to SP Mookerjee in January 1948

 My dear Dr. Mookerjee,


For some time past I have been greatly distressed by the activities of the Hindu Mahasabha. At the present moment it is functioning not only as the main opposition to the Government and to the Congress in India but as an organisation continually inciting to violence. The R.S.S. has behaved in an even worse way and we have collected a mass of information its very objectionable activities and its close association with riots and disorder. 

2. Apart from what I have written above, what pains me most is the extreme vulgarity and indecency of speeches being made from Hindu Mahasabha platforms. Gandhi Murdabad is one of their special slogans. Recently a prominent leader of Hindu Mahasabha stated that an objective to be aimed at was the hanging of Nehru, Sardar Patel, and Maulana Azad.


3. Normally one does not like to interfere with any political activities however much one may dislike them. But there  is a limit to this kind of thing, and I fear that the limit is being reached if it has not already been crossed. I write to you specially because of your own close association with the Hindu Mahasabha. We are continually being asked in our party, in the constituent assembly as well as elsewhere as to your position in this matter. I shall be grateful to you if you will let me know how you propose to deal with this situation which much be as embarrassing to you as it is to me.


Yours sincerely,

Jawaharlal Nehru

Pamphlet published entitled "The Misfortunes of the Kisans" Year 1929

Pamphlet published in Hindi, April 1929. J. N. Miscellaneous Papers.

How does a country become wealthy? By the labour of its people. The more industrious the people, the greater their production and the richer the country. Those who do not work are a burden on the country and impoverish it. How many of us are adding to our country's wealth and how many are making it poorer?

The Kisan's work on the land is productive and adds to the prosperity of our country. Labourers and workers do the same. A carpenter make something useful like a plough with a piece of wood; a weaver or a blacksmith increase our wealth by his craft. A good writer or artist, too, is an asset to the country. Teachers also help in their own way for education is the greatest of riches and the chief means of producing wealth. The shopkeepers and tradesmen sell commodities produced by others when they needed most and that help to enrich the land.

On the other hand take a zamindar who is rich; but where did he get his money? He received it as a rent from his tenants. This transfer of money has not increased the country is wealth.  Similarly a moneylender, who prospers by collecting heavy interest from others does not benefit the country in any way. Lawyers too become rich by extracting money from others. As for idle rich who live on the property inherited from their ancestors, they are a burden on the country. They might sometimes help in seeing that justice is done. But their profession does not benefit the country to any great extent

Every man requires food, drink, and clothing. if he does not, by his labour produce sufficient for his needs, he impoverishes the country. Naturally a country with many such people deteriorates. There are many in India who are totally idle, doing practically no work of any kind.

It is said that there are 52 lakh sadhus and beggars in India. Possibly some of them are honest. But there is no doubt that most of them are completely useless people, who wish to dupe others and live on their earnings without working themselves. Our kisans are so simple that they worship and feed a man who bears the slightest resemblance to a sadhu. But saffron robes or a long tika do not make a sadhu. Our country is overburdened by these lakhs of idlers and worthless people. And this will continue as long as our kisans continue to have blind faith in sadhus. We should not help these people and force them to work instead. It should be clearly realised that if these 52 lakh also worked, production would greatly increase. Thre are many who take advantage of the credulity of others e.g. quacks, and pandas at place of pilgrimage--who rob people in the name of religion. These too are a burden on the country and should try to take up work which will bring wealth and prosperity to the country.


Gandhi on Bhagat Singh

Excerpts from Collected Works of Gandhi

 

1 DARYAGANJ, DELHI, 

March 23, 1931 

DEAR FRIEND, 

It seems cruel to inflict this letter on you, but the interest of peace demands a final appeal. Though you were frank enough to tell me that there was little hope of your commuting the sentence of death on Bhagat Singh and two others, you said you would consider my submission of Saturday. Dr. Sapru met me yesterday and said that you were troubled over the matter and taxing your brain as to the proper course to adopt. If there is any room left for reconsideration, I invite you attention to the following. 

Popular opinion rightly or wrongly demands commutation. When there is no principle at stake, it is often a duty to respect it. 

In the present case the chances are that, if commutation is granted, internal peace is most likely to be promoted. In the event of execution, peace is undoubtedly in danger. 

Seeing that I am able to inform you that the revolutionary party has assured me that, in the event of these lives being spared, that party will stay its hands, suspension of sentence pending cessation of revolutionary murders becomes in my opinion a peremptory duty. 

Political murders have been condoned before now. It is worth while saving these lives, if thereby many other innocent lives are likely to be saved and maybe even revolutionary crime almost stamped out. 

Since you seem to value my influence such as it is in favour of peace, do not please unnecessarily make my position, difficult as it is, almost too difficult for future work. 

Execution is an irretrievable act. If you think there is the slightest chance of error of judgment, I would urge you to suspend further review an act that is beyond recall. 

If my presence is necessary, I can come. Though I may not speak1 I may hear and write what I want to say. 

“Charity never faileth.” 

I am, 

Your sincere friend,


STATEMENT ON EXECUTION OF BHAGAT SINGH AND COMRADES 

NEW DELHI, 

March 23, 1931 

Bhagat Singh and his companions have been executed and have become martyrs. Their death seems to have been a personal loss to many. I join in the tributes paid to the memory of these young men. And yet I must warn the Youth of the country against following their example. We should not utilize our energy, our spirit of sacrifice, our labours and our indomitable courage in the way they have utilized theirs. This country must not be liberated through bloodshed. 

About the Government I cannot help feeling that it has missed a golden opportunity, to win over the rebels to its side. At least from the point of view of the settlement, it was its duty to postpone indefinitely the carrying out of the death sentence. The Government has by its own act dealt a severe blow to the settlement and has shown its capacity to disregard public opinion once again and to exhibit the great brute strength it possesses. 

The reliance on violence is perhaps ominous and it suggests that in spite of high-sounding and pious proclamations, it does not want to part with power. But the people’s duty is clear. 

The Congress must not swerve from the path it has chalked out for itself. According to my view, notwithstanding the gravest provocation the Congress should endorse the settlement and test its capacity to secure the result hoped for. 

We must not put ourselves in the wrong by getting angry. We must realize that commutation of the sentences was not a part of the truce. We may accuse the Government of violence but we cannot accuse it of breach of the settlement. It is my conviction that the grave blunder committed by the Government has increased our power to win freedom and Bhagat Singh and his comrades have embraced death therefor. Let us not throw away this opportunity by doing anything in anger. It is beyond dispute that there will be a general strike and we cannot honour the deceased patriots better than by taking out absolutely peaceful and dignified processions. 

[From Gujarati] 

Gujarati, 29-3-1931

Tuesday, March 23, 2021

Why I believe US electronic voting machines might be better than India's voting machine

 Ok, so I don't know much about actual design of voting machines being used in US but I liked the fundamental architecture where the voting machine prints a physical paper ballot which is used on a different counting machine to generate election results. I think that system provided complete verifiability and auditing capability for the electoral process. As a last resort one can physically count the ballot papers and generate result.

Why I believe VVPATs reduce confidence in EVMs.

Our current system is too opaque. The VVPAT verification that is done is very small compared to total numbers of votes cast. There is no way for one to figure out if the actual vote cast is same as the vote registered. Current VVPATs only guarantee that slip that is printed is same as the vote that was cast.

Anyway, not that anybody is willing to listen and change. 

Wednesday, June 24, 2020

Baudhayana: The man who knew Pythagoras theorem 300 years before him

Baudhayana is believed to have born around 800 BCE while Pythagoras was born in 570 BCE. The popular theorem that carries the name of Pythagoras says square of length of hypotenuse  is equal to sum of squares of two other sides in  a right angle triangle. While not said in so many words, here is what Boudhayana says in his book Sulba Sutra.

चतुरश्राच्चतुरश्रं निर्जिहीर्षन्यावन्निर्जिहीर्षेत्तस्य करण्या वर्षीयसो वृघ्रमुल्लिखेहृघ्रस्य 
पार्श्वमानीमक्ष्णयेतरत्पार्श्वमुपसहंरेत्सा यत्र निपतेत्तदपच्छिन्धाच्छिन्नया निरस्तम्      

If you wish to deduct one square from another use the following method.
  1. Cut off from the larger one an oblong with the side of the smaller one
  2. Draw one of the sides of that oblong across to the other side
  3. Where it touches the other side, that piece cut off; but it the deduction is made
Look at the figure above, abcd is the larger square, we want to cut from it a square of length of the side de. Draw an arc of length ef from f to g. Now dg is the length of the square which is arrived after subtracting from square abcd and square of length de.
This is nothing but what is also known as Pythagoras theorem.

Monday, June 22, 2020

Aryabhatta and Eclipses

Yesterday was a solar eclipse and the usual superstitions about eclipses were doing the rounds of internet. Here is what Aryabhatta had figured out in 400-500AD about eclipses.

स्फुटशशिमासान्तेऽर्क पातासन्नो यदा प्रविशतीन्दुः |
भूच्छायाँ  पक्षान्ते तदाधिकोनं ग्रहणमध्यम् ॥
 At the end of the lunar month, the Moon, lying near a node (of the moon), enters the Sun, or, at the end of lunar fortnight, enters the Earth's Shadow, it is more or less the middle of an eclipse. (Solar eclipse in the format case and lunar eclipse in the latter case).

भूरविविवरं विभजेद् भूगुणितं तु रविभूविशेषेण|
भूच्छायादीर्घत्वं लब्धं भूगोलविष्कम्भात्  ॥
 Multiply the distance of the Sun from the Earth by the diameter of the Earth and divide the product by the difference between the diameters of the Sun and the Earth : the result is the length of the shadow of the Earth (i.e. the distance of the vertex from the Earth's shadow) from the diameter of the Earth (i.e. from the center of the Earth)

The old Hindu method of deriving this formula, called the The Lamp and Shadow method, (प्रदिपच्छ्यकर्म) is as follows.
 
In the figure above, S is the center of the Sun and E is the center of Earth. SA and EC are drawn perpendicular to SE and denote the semi-diameter of the Sun and Earth respectively. BC is parallel to SE. V is the point where SE and AC produced meet each other. If SA is considered to be a lamp post, EC is a gnomon and EV is the shadow cast by the gnomon due to the light of the lamp. Consequently EV is the length of Earth's shadow from the diameter of the earth.
The triangles CEV and ABC are similar.

Aryabhatta extensively studied phenomenon like eclipses and described various details about  it in his book. Looks like superstitious crowd is none the wiser after 1500 years.