Thursday, December 31, 2020

Fixed Deposits - Worst Investments for Long Term

 First time, I helped a person in filing a return who paid more income tax due to "income from other sources" than "income from salary" [Of course, by taking "income from other sources" to the top bracket].

The culprit is Fixed deposits.

That person is using FDs to save all her money and there is a significant amount in the Fixed Deposits. She does not need the money anytime soon and she put FDs with cumulative interest and automatic renewal.

One needs to pay the income tax on the entire interest that is realized every financial year. Even if one does not take the interest from the FD, even if the FD is not closed/renewed in that financial year, still the tax has to be paid, because the bank is adding the interest to the FD and it is income for you. You need to pay tax on the interest at the top bracket.

If you are having significant money in the bank, you would be forced to pay a lot of tax.

FDs are the worst possible investments especially for long term. One should use FDs only to keep money for emergencies or to use in the next few months.

For short term investment, I recommend Liquid Mutual Funds (or even Debt MF). With Liquid (or Debt) Mutual Funds, one needs to pay the tax only at the time of withdrawal. If we withdraw after 3 years, the profit is adjusted with the inflation, and the tax would be even less.

For long term investment (6 years or more), I recommend either Equity Mutual Funds or Land.

Monday, December 07, 2020

Freedom in Agriculture

If I am doing a transaction with a person/organization, and if anyone is trying to stop that by any unfair means, I consider the people/organizations who are trying to stop that transaction as criminals. However they have full freedom to convince the person/organization transacting with me, to not transact with me. They have full right even to offer bribes to the other person. But, they do not have any right to threaten them to not transact with me. Those whoever threatening or stopping the transaction by any other way are criminals in my point of view (irrespective of whether the law of the land says it or not).

If I am a farmer and if I can find someone who is ready to purchase my produce for a mutually agreeable price, and if anyone tries to stop that transaction by unfair means, they are criminals in my point of view. 

Fair means to stop the transaction means, atleast one party should be better off by cancelling the transaction [Other party can be worse off]. Unfair means, neither party would be better off by cancelling the transaction. 

Few examples of the fair means to stop the transactions are,

Offering higher price to me, so that I can sell the produce to you rather than the other person.

Offering lesser price to the other person, so that they would buy the produce from you rather than from me. 

Giving some additional goodies to either of them, like free transport, free loading/unloading or anything that is typically done before or after the purchase.

Few states legislated that, the sell price must not be less than the minimum support price. If anyone buys for lesser price, they would be imprisoned. 

If the Government is ready to buy from everyone for minimum support price, then why do they need to legislate that? Why will someone sell for a lesser price, when the government buys from the farmers at a higher price? That legislation will only be (mis)used to blackmail few vendors, and never required for ethical reasons. 

If the Government is not going to buy from everyone, and if vendors are not ready to buy at government set price because of lack of market, what would happen? If one has to follow the legislation, then the farmers have to burn all their produce because no one was willing to buy that. For the ignorant people, there are many farmers, who burnt their farm without plucking anything from that (for different reasons).

If they are given the option to sell for a lesser price, atleast they would get some amount rather than zero. 

Even when the government is ready to buy from everyone for Minimum Support Price, still, few farmers may sell for a lesser price to few vendors for other reasons. The cost of plucking, transport to the nearest market etc., are significant in the cost to the farmer. If the vendor is ready to take care of all those, then it makes sense to the farmer to sell it to that vendor for a lesser price rather than seemingly higher Minimum Support Price.

Each individual knows what is best for them. It is a crime to interfere in others' matters. The maximum thing that one can do is, convincing the seemingly losing party.

Friday, December 04, 2020

C# Code for Validating Azure B2C Token

string tenantId = "FA368AEE-7911-41FA-9E16-D5B6A663777D";
string clientId = "2906B74F-96A9-45AA-BA1B-5175830991AF";
string validIssuer = $"https://contoso.b2clogin.com/{tenantId}/v2.0/";
string keysIssuer = "https://contoso.b2clogin.com/contoso.onmicrosoft.com/B2C_1_signup_signin/v2.0/.well-known/openid-configuration";

var signingKeys = new ConfigurationManager<OpenIdConnectConfiguration>(keysIssuer, new OpenIdConnectConfigurationRetriever()).GetConfigurationAsync().Result;

SecurityToken securityToken;
var tokenHandler = new JwtSecurityTokenHandler();
var claimsPrinciple = tokenHandler.ValidateToken(token, new TokenValidationParameters() { 
	ValidIssuer = validIssuer,
	IssuerSigningKeys = signingKeys.SigningKeys,
	ValidateAudience = true,
	ValidAudience = clientId
}, out securityToken);

Saturday, November 21, 2020

You are not the highest bidder - but you were offered the auction item

You participated in an auction. You did not win the auction. After few days, the auctioneer called you and offered the auction item for your highest bid. Would you buy that item for your highest bid?

That might be a potential scam. 

You are interested in buying an item for Rs.20 Lakh. The next actual buyer is ready to buy for Rs.10 Lakh. Let's say, in the auction, the minimum increment is Rs.1000. In a fair auction, you can get the item for Rs.10,01,000. 

Let's say, the auctioneer put someone from his team to win the auction. Then, that person wins the auction for Rs.20,01,000. Since, the winner is from the team of the auctioneer, they won't actual take the item. After few days, you would get call from the auctioneer that, they are ready to offer you for the amount you quoted. If you accept that, you are going to lose big time. 

Even if you ask for another auction to be performed, it is not going to help that much. Because, the auctioneer knows that, you were ready to buy for Rs.20 Lakh, they can manipulate you to buy for atleast Rs.18 Lakh or Rs.19 Lakh by having their own member in the next auction as well. 

When someone has done a scam like above, and if they are doing re-auction, it is not going to be fair by any means. Because, the auctioneer has the complete data of everyone's highest bid. They can easily manipulate it, so that, they can get a good deal. 

Saturday, November 14, 2020

NPCI asking Google Pay/Phone Pay to reduce their transactions

NPCI has asked Google Pay and Phone Pay to reduce their number of transactions, since they are becoming monopoly in the UPI transactions. 

Google Pay and Phone Pay have share of almost 40% each, and NPCI asked them to reduce their share to 30% (Of course, they are given some time to reduce their share). 

It is one of the most stupid rulings by NPCI in the name of Monopoly. It is like going back to Pre-1991 days, where Nehru-Gandhi family dictated each organization how much they could produce. After producing their licensed quota, they need to stop the production, even if they are capable of producing more and have enough money and resources. 

In general, to break the monopoly, the concerned authority should not do anything except giving license to everyone liberally and making sure the organizations are following the rules set by them. 

In this case, NPCI has already given licenses to many organizations. So, there is nothing that it should do. How much business would the organization get depends on their quality of service and the customer satisfaction. NPCI should not put its finger in that. 

If NPCI wants to break the monopoly, it should go and ask more organizations to provide UPI services and give even more licenses liberally. However, it should never discourage anyone (like it is doing in Google Pay or Phone Pay case). 

The only other thing that NPCI should worry is, breaking the rules set by NPCI. For example, NPCI may say, the application should transfer to any UPI. If Google Pay or Phone Pay are intentionally failing transactions to UPIs of other providers, then that can be taken as non-compliance and can impose penalty for that. The penalty can be huge so that they follow the rules properly. But, they should not ask them to reduce their share in the market. 

Another mistake that few authorities are doing is, imposing monopoly restrictions because of the offers that big players are giving. 

The big organization (which is having a lot of money) gives very good offers to the public [The service is sold at less than their cost]. Everyone starts using the services of big organizations. The small organizations cannot sustain and in due process, those would be closed. Once most of the small organizations are closed, the prices are increased significantly and the big organization gets enormous profits. 

With this logic, authorities try to limit the offers given by the big organizations. But, authorities should never try to do that. They only need to make sure that a new organization can be started for providing that service without much hassle, and people have the option to switch the provider. 

Many years back, Foodpanda used to give a lot of offers and people used to buy food from that. Once they stopped giving offers, people stopped buying from that, and people simply switched to other providers. If any authority had asked them to reduce the offers, the public would have lost a lot.

When Paytm started, it gave a lot of offers. After demonetization, it reduced its offers and at the same time, Google Pay started with a lot of offers and people shifted to Google Pay. If a new provider starts giving offers, then people won't take any time to move to that new provider. 

The goal of the Union Government is to increase digital transactions. When Google Pay and Phone Pay are penetrating a lot to reach more people, the Government should not put any barriers on that. 

NPCI is not run by the government. But, why is NPCI given such power to reduce the business of the organizations?

Monday, November 09, 2020

Elasticsearch - Backup and Restore using Snapshots

The data in Elasticsearch can be backed up using snapshots and it can be restored to a different Elasticsearch cluster.

To take backup of the Elasticsearch on the source cluster, first we need to create a repository (in Elasticsearch) with the target location and type.

The type of the repository is, where do you want to store the backup files. The type can be File Share, Microsoft Azure, Amazon S3, Google Cloud or Hadoop HDFS.

Complete details on Creating a Snapshot is found at https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-register-repository.html


Creating a File Share Repository:

put http://10.21.32.43:9200/_snapshot/mybackup
{
  "type": "fs",
  "settings": {
    "location": "/data/elasticsearch/backup"
  }
}
The above request would create a repository of type File Share and the backup files would be copied to /data/elasticsearch/backup


Creating a Repository in Azure:

Complete details of Azure Repository can be found at https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-azure.html

Before you create a repository in Azure (or even for other providers), please check your access to Azure Repository from your local and from all the Elastic Search Servers. Admin can configure access to cloud storage based on IPs. When there is an IP restriction in Azure, there is no way to find out that from the error messages.

We have to install a plugin for Azure for backup/restore. Command for installing azure plugin is

bin/elasticsearch-plugin install repository-azure

In linux, you may have to use sudo (If not running from root account). elasticsearch may be found at /usr/share/elasticsearch/bin

After installing Azure plugin, we need to add the storage account name and the secret key in Elasticsearch to connect to Azure.

echo This/is/a/key/for/Azure/Storage== | elasticsearch-keystore add -stdin azure.client.default.key

echo AzureStorageAccountName | elasticsearch-keystore add -stdin azure.client.default.account

You may have to use sudo in linux.

Once Elasticsearch is configured to use Azure, we can create a repository.

put http://10.21.32.43:9200/_snapshot/mybackup

{
  "type": "azure",
  "settings": {
    "client": "default",
    "container": "test",
    "base_path": "testpath"
  }
}

This would create a repository, and the snapshot files would be created in testpath in the test container of the storage account.


Taking Snapshot:

The below request starts the process of creating a snapshot

put http://10.21.32.43:9200/_snapshot/mybackup/snapshot1?wait_for_completion=false

With the below request, you can see the status of the snapshot. For any snapshots in progress, it would show the details of the snapshot like how many indices are completed, in progress, not yet started etc. If there are no pending snapshots, it would return an empty array.

put http://10.21.32.43:9200/_snapshot/_status


Incremental Snapshots:

When you take multiple snapshots in a repository, each snapshot is complete for all practical purposes. Any snapshot can be restored or deleted independent of any other snapshot.

But, internally, the snapshots are incremental. i.e., when you take another snapshot in the same repository, it would create the files for the changes that happened since the last snapshot. The metadata of the snapshot would be created appropriately to get the data required from that snapshot.


Creating Read Only Repository (On Destination):

On the destination Elasticsearch cluster, we need to create a read only repository pointing to the same location (either file share or Azure or any other cloud provider). Making the repository as read only is the only difference with respect to the creation of the repository on the source cluster.

put http://10.89.78.67:9200/_snapshot/mybackup

{
  "type": "azure",
  "settings": {
    "client": "default",
    "container": "test",
    "base_path": "testpath",
    "readonly": true
  }
}


Restoring the Snapshots:

The below request would restore the snapshot on the destination cluster.

post http://10.89.78.67:9200/_snapshot/mybackup/snapshot1/_restore


Restoring Status:

There is no specific request to check the status of the restore. However, when the restore is started, the cluster would go to yellow state. Once it goes to Green state, we can understand that the restore is completed.

The below request gives the status of the cluster.

get http://10.89.78.67:9200/_cluster/_health


Restoring Incremental Snapshots:

When you restore incremental snapshots, you would get an error since there is already an index in the destination cluster with the same name as the index that the restore is trying to create.

To restore the snapshot from second time onwards, you need to close the existing indices, so that the cluster can update them.

Request to close all the indices

post http://10.89.78.67:9200/_all/_close

Request to close one index

post http://10.89.78.67:9200/indexName/_close


Restore after Closing the Indices:

During the restore, Elasticsearch would open the indices that needed to be updated. If any index is not there in the snapshot, then that index would not be opened and it would continue to be in closed state.

If you are using the destination cluster only as a backup of another cluster, if you see any index in closed state after a restore, it means that index was deleted from the source cluster.


Handling Aliases:

If you are having aliases in the source cluster, and if the underlying index is getting changed and the old index is getting deleted, then you need to do special handling on the destination cluster.

For example, in the source cluster, you create one index everyday. The index name may be something like IN20201105, IN20201106 etc. You have an alias named INDate, which is pointing to that day's index. You keep only the active index and remove all the old indices.

In this case, when you take snapshots everyday, the indices are going to be different each day. The index that was present yesterday won't be present today.

When you restore the snapshots everyday on the destination cluster, the deleted indices would be in closed state.

When the indices are restored, the aliases would be restored with the relationship with the new index, but it won't delete the relationship with the old index. The alias would be pointing to both old and new indices. When you query the alias, it would have both the old index (that was deleted in the source cluster and closed in the destination cluster) as well as the new index. Since, one index in the alias is in closed state, you would get an error when you are trying to query it.

The simple option is deleting all the indices that are in closed state after a restore.

Request for deleting an index

delete http://10.89.78.67:9200/indexName/


Automated Snapshot and Restore everyday:

The snapshot can be taken in the source cluster without having any impact on the source cluster. However when you restore, the cluster would be down for some time.

You can use any scripting language that you are comfortable for the automation. I used WGET and VIM for automatic snapshot and restore.

There are 4 steps in the entire process of snapshot and restore. First step is on the source cluster and the next 3 steps are on the destination cluster. You have to schedule in such a way that, before the second step is started, the first step is completed.


1. Take Backup in the source cluster

Request in Linux

wget -d --method=put "http://10.21.32.43:9200/_snapshot/prodbackup/s`date +\%Y\%m\%d`?wait_for_completion=false" -O CreateSnapshotES.txt -o CreateSnapshotNetwork.txt

Request in Windows

In different versions of Windows (and/or localization), the date command is displayed with different formats. You need to check the date command's format.

wget -d --method=put "http://10.21.32.43:9200/_snapshot/prodbackup/s%DATE:~-4%%date:~4,2%%date:~7,2%?wait_for_completion=false" -O CreateSnapshotES.txt -o CreateSnapshotNetwork.txt


2. Close the indices on the target cluster

Request to close all the indices

wget -d --method=post "http://10.21.32.43:9200/_all/_close" -O CloseDRIndicesES.txt -o CloseDRIndicesNetwork.txt


3. Restore the snapshot on the target cluster

Request to restore the snapshot on the target cluster [Date part of the request should be same as in the request 1.]

wget -d --method=post "http://10.89.78.67:9200/_snapshot/prodbackup/s`date +\%Y\%m\%d`/_restore" -O DRRestoreES.txt -o DRRestoreNetwork.txt


4. Delete the closed indices

I used VIM and WGET for automating this.

Create a file vimclose.vim with the following content (Change the IP address in your script). Make sure that there is a new line at the end (after :wq).

:v/close/d
:%s/.*close *//
:%s/  *.*//
:%s/\(.*\)/wget -d --method=delete "http:\/\/10.89.78.67:9200\/\1" -O \1.json -o \1.txt/
:wq

Create a batch file or shell script with the following content.

For Windows.

wget "http://10.89.78.67:9200/_cat/indices?v&s=index" -O closedindices.bat
vim -s vimclose.vim closedindices.bat
closedindices.bat

For Linux

wget "http://10.89.78.67:9200/_cat/indices?v&s=index" -O closedindices.sh
vim -s vimclose.vim closedindices.sh
bash closedindices.sh

Sunday, November 01, 2020

IRCTC - Autocratic, Unfair, Unethical and Monopolistic organization

IRCTC is one of the most Autocratic, Unfair, Unethical, Technically dumb and Monopolistic organizations in India. 

Since IRCTC is no longer a wholly owned government organization, Union Government should revoke the special privileges that it is getting. Till now, IRCTC is the sole organization which is selling tickets online. The Union Government should come up with a fair process and select multiple organizations to sell the tickets online. If the Union Government selects only one organization, it may do unethical, unfair activities and may trouble the people (what IRCTC is doing now). If the license is given to multiple organizations, it would encourage the competition and people would get better services. 

Also, IRCTC should not be having any special legal provisions which are not available to any other public limited company. IRCTC is using the RPF Acts to arrest others, when the mistake is with IRCTC itself. If IRCTC cannot secure their site, then IRCTC should not be allowed to sell the tickets online, and the license should be given to other organizations by following a fair process. 

Unfairly giving exclusive power to IRCTC (Selling tickets online)

IRCTC is a public limited company, and not wholly owned government company. Indian Railways is giving full power of selling tickets online to one single company, IRCTC. When it was wholly owned by the government, it was fine. But, when it is a public company, it is completely unfair. 

If Indian Railways want to give license to some organization for selling tickets online, it should come up with a proper process and invite any organization to bid for that, and the license should be given to multiple organizations that satisfy the criteria. [If License is given to one organization, that organization may become an autocrat.]

Indian Railways did not follow any of that process and gave exclusive license to IRCTC alone. This is unfair by any standard. This is worse than 2G or Coal scams. Media and Opposition parties are concentrating on the scams where black money exchanged hands. But, if we see the potential loss of money or unfair process on very big transactions, this is much more unfair than 2G or Coal scams.

Technically Dumb Organization

IRCTC is the most technically dumb organization. It is surviving solely because of the exclusive power given by the Government. If the Government stops giving exclusive power, almost nobody would buy tickets from IRCTC. 

IRCTC is blocking the users for using the autocomplete feature in their browsers. Autocomplete feature is there in the browsers for decades. Anybody who knows computers a little bit would use autocomplete to fill the forms. If IRCTC wants to block auto complete, it needs to come up with its own technology which makes auto complete not possible for the users. But, IRCTC did not come up with anything like that, but blocked users who used the browser's autocomplete feature. This is the dumbest thing by any standard, and unfortunately IRCTC does not understand that it is the dumbest thing.

Special Legal Powers for IRCTC

Since, IRCTC is a public limited company, the legal powers of IRCTC should be like any other public limited company, and it should not have any special powers. Right now, it is misusing the RPF Act and other provisions that are exclusive for the Government organizations. IRCTC is incapable of handling even basic (Software) security, but it is passing the blame to others and arresting them.

The following are the blatant misuses by IRCTC.

Auto Fill Software

Technically dumb IRCTC arrested one person in Vellore, Tamilnadu for using "Auto Fill Software". Anybody who understand software technology can clearly say, how dumb it is. Autocomplete feature has been there since the beginning of the browsers and many people use it. If IRCTC does not want people to use Auto Complete, it has to bring its own technology which prevents Auto Complete. Instead of doing that, it is arresting people or blocking users for using Auto Complete. 

It is like, IRCTC was thinking that it was in the 1700s (when there were no cars), and arresting people for using cars, bikes and other vehicles. 

Insufficient Security of IRCTC - Who needs to be blamed for theft?

If a person thieves from a house every day from the same house, who needs to be blamed? Is it the house resident or the thief?  A thief needs to be blamed. But, more than that, the resident of the house needs to be blamed. If a thief steals for one or two days from a house, we can say that the thief is wrong. But, if a thief is stealing from the same house everyday, it is the mistake of the resident of the house for not taking enough precautions even after facing theft multiple times. IRCTC is doing exactly like a resident. If anyone hacks their system regularly, then they should block the access for that hacker. Instead of that, they are putting the blame on the hacker. 

If a person has booked tickets unethically for a couple of months, what IRCTC is doing without fixing that issue. [In this statement, the word unethical is used only by IRCTC, and no person who has some technical knowledge would use that word.]

Intentionally Reducing Security - An Illustration

I have taken a few valuable items from others and told them that I will secure it in my house. One person is repeatedly coming to my house and stealing a few things from my house. I lodged a police complaint against the unknown thief and still the thief is stealing from my house and I did not do anything to secure my house. When others ask me to return their valuables, I will tell them that the thief has stolen everything and I don't have anything. Can I just live as if nothing happened? 

Any person who knows logic and has some common sense would say that, I am responsible for everything, and for the things lost, I need to buy that with my own money and return to the actual owners. 

In the same way, IRCTC is responsible for keeping it secure. If it is one off case, we can understand that, there is some issue. If IRCTC claims, someone hacked their system and booked X no.of tickets over a few months, it is the issue with IRCTC and not the hacker. Responsible people of IRCTC should be punished for non taking enough security.

Public Access - Private Access

There are two types of access to any website. One is public access. Other one is private access. Private access refers to the restricted access like access to the servers, databases and others which are not meant for the public. Public access is referred to the access that everyone gets without any permission. Typically, it means, anything that one can browse through the site. 

If anyone gets private access to the resources of any website, the website owner has to investigate how others got private access and should take necessary steps.

If anyone is getting something by the public access, which is not intended by the website owner, then it is the mistake of only the website owner and not by anyone else. Only the website owners have 100% responsibility.

As far as I know, I never read the news about getting private access to IRCTC by anyone. Even if it is there, most probably, it is due to some employee of IRCTC leaking the credentials or access etc. IRCTC filed most of its cases, where someone did something with public access. 

Public Access - Handling by Other Organizations

If the website owner does not want something to happen in their site, but, if someone could do it through public access, then it is the sole mistake of the website owner. The big organizations know that, and they offer a very good amount to those who find those mistakes and report to them. 

Awards by Major Organizations for Finding Security Loopholes

Microsoft - Rs.1.8 Crore

Google - Rs.1 Crore

Facebook - Rs.15 Lakh

Amazon - Rs.11 Lakh

IRCTC - Arrest people

Our great IRCTC arrests people saying they hacked their site. [For the cases filed by IRCTC, no good technical person calls it hacking. It is only advanced usage. Since, IRCTC is dumb in technology, it calls the advanced users' usage as hacking.]

Bypassing the Railway System

For one arrest of an individual, the media report says that the individual bypassed the railway system to book the train ticket. I don't know whether it is mentioned like that in the case report, or the media used its own words. There is absolutely no meaning to bypass the railway system to book a ticket, because the tickets are in the railway system. The person would not even have bypassed IRCTC. The person would have used some software technique to book the tickets faster (which a non-software engineer might not know). 

As mentioned above, if IRCTC does not want to use the advanced features in the browsers, they should come up with new technology, and not arrest people who are using advanced features.

Making Money Illegally was Crime

There is a mention that the person was charging Rs.10/ticket and it is illegal to make money that way, and it was a crime.

For example, if I am not in a situation to book a ticket myself, and if I offer someone Rs.10 to book on behalf of me, are you going to arrest the person who booked a ticket for me? If so, you need to arrest the majority of Indians. 

Penalty for unauthorised carrying on of business of procuring and supplying of railway tickets

The above sentence is mentioned in one media report of one person's arrest. If this is correct, Railway police needs to arrest the head of IRCTC and other top people of IRCTC. The reason is, IRCTC is not fixing the issue, and allowing people to exploit. Even when someone is exploiting, IRCTC is arresting that person and blocking that person's app, and not fixing the issue of IRCTC. That's why, repeatedly different people are hacking. So, IRCTC top people must be arrested for allowing others to exploit the railway system.

[Hacking and exploiting words have to be taken from the definition of IRCTC. No good technical person would call that hacking or exploiting.]

Can non-tech people book a tatkal ticket easily?

Before IRCTC says useless things like, "deprived of a chance to buy tickets", we have to check whether a non-technical person can book a tatkal ticket? I am sure, if you take a good technical person and non-technical person (who has enough experience in buying things online) in booking a tatkal ticket, the technical person has a better chance of getting a confirmed ticket. IRCTC is already depriving non-technical people from buying the tickets. It is arresting people who are helping others with their expertise. It is blocking the users who are using their expertise for themselves. 

Why is someone paying a higher amount?

IRCTC and other government organizations should introspect why someone is paying a higher amount for the same thing that is offered by the government organization for a lesser price. If Indian Railways or IRCTC are offering a ticket for a lesser price, then why are people going to others and paying higher amounts for the same ticket. Few people who do not have enough knowledge would say that, those people are blocking the tickets and the common man does not have any other option other than going to them and pay a higher price. This can be true for the printed government bus tickets, but not true for Train tickets (or even flight tickets). Indian Railways is very secure and a non-employee cannot block the tickets and sell it to others. 

Whomever IRCTC is claiming as hackers, they are just helping others to book tatkal tickets, because non-technical people cannot book the tickets. Few of them might be using automated tools to help others. Since, IRCTC is not helping non-technical people to book Tatkal tickets, they are going to someone else and paying higher amounts. 

If the same situation happens to any private commercial organization, they would solve the problem of non-technical people by some other means, rather than filing cases against people who are helping. In fact, it is a very big business opportunity for the organization. 

Change of name/age/sex in the ticket and other internal security issues

A person who is not an employee of Indian Railways/IRCTC cannot change the name, age, sex of any ticket. Whether IRCTC agrees or not, Indian Railways is very secure (By the definition of any popular technical organization). It is not possible for a non-employee to block the ticket and sell it to others. If I book a ticket, then the ticket can be used only by someone of the same name/age/sex mentioned in the ticket. If someone has changed any of those, it is definitely with the co-operation of some employee of Indian Railways/IRCTC. The employees of Indian Railways/IRCTC should be punished more, because they have internal access to the system. 

Share Price of IRCTC

IRCTC is having a higher share price, only because of unfair power that it has received from Indian Government. The moment the Union Government follows a fair process for Train Tickets, the share price would hit rock bottom.

Wednesday, October 28, 2020

Failed to validate file names - Azure Storage File upload

When I am trying to upload a file in Azure Storage, I got an error, "Failed to validate file names". The file name does not have any special characters or unicode characters.

The actual reason is, my IP is not whitelisted for that storage account. When, I whitelisted my IP, I could upload the file without any issue.

Event AzCopy command also did not work when my IP was not whitelisted. At the same time, it did not show any reason on why the request failed.

Saturday, October 24, 2020

Rejection of Agriculture Bills by Punjab Government

Punjab Government rejected the new Agriculture bills brought by Union Government.

Can they say what benefit the farmers in Punjab are going to get by this?

When the farmers in the entire country can sell to whomever they want and for whatever price they want, farmers in Punjab cannot do that. Is it a benefit to the farmers of Punjab?

If the farmers in the country outside Punjab wants to have any agreement with anyone, they can do it. Farmers in Punjab cannot do anything like that. Is it a benefit to the farmers of Punjab?

If Punjab Government wants to show their disapproval without harming the country, they can say something like, they don't have infrastructure to handle the disputes arising out of those acts. The farmers should take the freedom at their own risk. But, instead, Punjab Government is restricting the farmers.

It is not the terrorists or militants that are destroying our country. It is the politicians who are destroying our country.

Wednesday, September 23, 2020

Farmers are not beggars

Farmers are not beggars. They need to have freedom. 

People say, we fought with the Britishers and got freedom. But, people did not get freedom till 1991 and after that, gradually we are getting more freedom.

When a bill is introduced to give freedom to farmers to sell to anyone/anywhere he likes and to have any agreement with anyone, those who support freedom must encourage. Those whoever is against the portions of the bill that are giving freedom, are against the basic rights (freedom).

If the bill has any part which is nothing to do with freedom, and if people oppose, it is their right. But, opposing the part which gives freedom is nothing but opposing the basic rights.

Other Comments for the bill.

C: Government would reduce Minimum Support Price (MSP) after this.

A: Fight against that reduction. Not against the bill that gives freedom. 

C: Small Farmers won't benefit out of it. 

A: Not getting benefits out of some freedom is not a reason to curb freedom.

C: Prices would increase after this bill

A: Then, you become a farmer and get more money. Till you become rich by farming, whatever extra that you pay for food, consider it as a price that you are paying to the farmers for curbing their freedom from 1947 till 2020.

C: This change is not enough

A: Yes. This is a very very small change and many many more reforms need to be brought to change the state of farmers. This is a baby step in that direction. 

C: We cannot trust corporates

A: You are not asked to trust corporates. You have freedom to trust or not. 

C: It is replaced by a different set of middlemen from the existing middlemen. [And many other related questions]

A: So what? What is the problem?

C: Why are farmers opposing?

A: When everything is kept as it is, but more freedom is given, a sane person should never oppose. If there is a fear of future reductions in others like MSP, they should fight for the reduction of MSP rather than the bill that gives freedom. 

Whenever any reform is brought, which gives freedom to a particular sector, the first set of people/organizations that oppose is, the existing people/organizations in that sector. Because, they lose the hold on that sector with the new entrants in that sector.

For example, if any state government liberalizes the transport sector and allows anyone to run buses without government approval, the first set of people who oppose would be the existing private bus operators. They may give any kind of reasons (either stupid or reasons that may look good). The private bus operators would have paid crores of rupees as bribe to the ministers and other officials to start their service. When others start without any bribe, they would be at serious disadvantage, and they cannot match the fare and suffer serious losses.

C: Government may close APMC

A: Once the farmers are given freedom, it is possible that, other government channels would become redundant, especially, if the private channels offer competitive prices. In those cases, even if APMC becomes redundant, government should keep it there for the name sake, so that, private channels won't become syndicate [However if the market is really open, there is a less chance for players forming syndicate.] 

Government's business is not do business. But, it should make sure that, monopoly/syndicate is not formed. In case, if there is a monopoly or syndicate, government should bring their own business/service, mainly to break the monopoly and syndicate. Government's business should be limited to breaking the monopoly/syndicate.

Any leader can promise to bring something like APMC and can bring it. But, except leaders like P.V.Narasimha Rao, Vajpayee and Modi, no other leader is bringing the freedom to people. For a very very small problem (which can be solved by anyone), we should not stop a major reform like this.

Monday, September 21, 2020

Changes to Multi Cap Mutual Funds by SEBI

The recent rule on expecting Multi Cap Mutual Funds to invest minimum 25% in each of the Large Cap, Mid Cap and Small Cap, is one of the worst rules that is brought by SEBI in the recent time. 

Post 2017, Multi Cap Mutual Funds is the only category, where AMCs have full freedom to invest in any stock. With this restriction, SEBI is curbing that freedom of AMCs. After this rule, there is no category, where AMCs have full freedom to invest in any stock. 

Not only SEBI is restricting the freedom of AMCs, it is forcing the investors to learn about Market and keep track of that. We can no longer just blindly trust AMC and invest. Before this rule, if any investor wants to invest, and if they trust on any AMC and they don't have any knowledge on anything else, they can just go with Multi Cap Mutual Fund of that AMC. With this restriction, they need to decide whether to invest in Large Cap, Mid Cap or Small Cap and change the investments based on the market. When AMC has freedom to change the investments, they can do it on behalf of the investors.

Another reason that is mentioned in the media is, the investments in Multi Cap Mutual Funds are like either Large Cap or Large & Mid Cap or one of the existing schemes. So, there is no need for another category. I don't know whether this reason is given by SEBI or not. This reason may look correct for those who are doing day trading or have very small duration for their investments. But, it won't work for those who are doing investments for the long term.

When freedom is given to AMCs, they may invest in the stocks that are going to perform better. When they do that, most of the time, that would match with one of the categories defined by SEBI. But, in a couple of years, when the market is changed, and if they think, other category stocks are going to perform better, the AMC may shift their investments to the other category. At any time, the Multi Cap may match with one of the categories, but, the main difference is, changing their investments based on the market from one category to another category. That basic freedom is removed from AMCs.

If SEBI wants, it can create a new category with this rule and let AMCs use the new category, if required. Or it can keep the present rule, but create a new category where the AMCs get full freedom on whichever stocks they want. 

In 2017, SEBI restricted the number of categories, forcing AMCs to offer only the basic categories and reduce the redundant categories. With this rule, Multi Cap is going to violate the principle that it had set. After this rule, instead of investing in Multi Cap, they can invest 1/3rd of that amount in each of the Large Cap, Mid Cap and Small Cap. If AMC is following the principle of having minimum strategies, then the return of the Multi Cap is exactly going to be the average of Large Cap, Mid Cap and Small Cap. Then, why do we need the Multi Cap category at all? We can remove that. 

In the same way, the Large & Mid Cap fund category is also redundant, because the AMC is forced to invest a minimum 35% in Large and 35% in Mid Cap. If the AMC has freedom to invest in any stock of Large & Mid Cap with 70% limit, then that category is of some use. But, with the present rule, investing in Large & Mid Cap is exactly the same as investing half of the investment in Large and another half in Mid Cap. 

I am not worried about the Large & Mid Cap fund, because it is just another redundant fund. What I am worried about is, removing the only category that was giving freedom. 

Before 1991, few officers in the government used to decide the IPO price. Everyone knows how bad it is for the stock market. This rule is also going in that direction, where few government officers are deciding what people need. 

All this may go in deaf ears, if there is some hidden reason for bringing this change. For example, if SEBI brought this rule to increase investments in Small Cap and Mid Cap, then irrespective of the correct logical reasons, this rule might not be changed. If there are hidden reasons like that, it is going to harm the country. 

"It will be a folly to ignore realities; facts take their revenge if they are not faced squarely and well." - Sardar Vallabhai Patel 

Sunday, September 20, 2020

Completed reading ISKCON Bhagavatham.

Completed reading ISKCON Bhagavatham.

I have taken 19 years to read the 18 volumes of ISKCON Bhagavatham.

Saturday, September 12, 2020

Worst Rule by SEBI - On Restrictions on Multi Cap

SEBI introduced one of the worst rules for the Mutual Funds. It is expecting multi cap mutual funds to have minimum 25% of the assets in each of the large cap, mid cap and small cap. Anybody who has little bit brain and maths knowledge can understand that, it is very very difficult for small caps to match the large caps. After the categorization of the mutual funds couple of years back, Multi Cap is the only type, where AMCs can invest in any stock they want. With this restriction, there is no type, where AMCs have full freedom to choose the stocks. Are we going back to Pre-1991 days?

Saturday, July 25, 2020

Managing Voter Perception

The following is an excerpt from the book, "India Unmade: How the Modi Government Broke the Economy" by Yashwant Sinha. 

Sometimes even a benign measure can have adverse consequences, like the national highway project. I later found that in 2004 we lost all the constituencies that lay along the Grand Trunk Road that goes from West Bengal and through Jharkhand, Bihar, Uttar Pradesh, Haryana and Punjab up to the Pakistan border. It was a paradox. The highways programme was the Vajpayee government's most outstanding project - his enduring legacy, the accomplishment now cited by even his staunchest political opponents - so we should have won in those very constituencies. We lost, however, because all highway encroachers were evicted. Even in my constituency of Hazaribagh, removing encroachers made a lot of voters angry. This is the political reality of India.

There is thus an argument to be made that there is no correlation between good work and getting re-elected. Any correlation is the first fallacy of punditry. Voting is only marginally connected to the work you might have done, or the government you were a part of. It is dependent on many other factors which may or may not work in your favour. 

The biggest factor is managing voter perception, a fact of which the Modi government is obviously keenly aware. Take the election in 1989, in which V.P.Singh overtook Rajiv Gandhi as Mr Clean because the Congress prime minister was bogged down by the Bofors scandal. Chandra Shekar as prime minister used to wonder out loud to me that V.P.Singh as Rajiv's finance minister had to have given approval to the Bofors gun procuremenet. Yet he was never stained by the scandal. Rajiv Gandhi's defeat by V.P.Singh was thus a result of perception management.

Saturday, July 18, 2020

Lies, damned lies and statistics

Say there are 100 people in a community and 5 of them are poor. The poverty rate is 5%. Say one of them dies of starvation. There are now 99 people and 4 of them are poor. The poverty rate is now 4.04%. The Leader puts out a celebratory announcement: The Poverty Rate has Declined by nearly 20%!
But is this really a good thing?
A similar trap awaits the unwary in the other direction. Say, again, you start with a population of 100, where only 5 are poor. The poverty rate is 5%. However, let’s say that these poor people are the strongest and healthiest of the poor. The weaker ones, especially infants, already died. The Leader pumps money into healthcare for the poor, focusing on reducing infant mortality. The next year the census reports that the population is now 105, of which 10 are poor. The poverty rate is now 9.5%. The opposition party puts out an accusatory press release: Under Leader’s Inept Rule, Poverty Rate Increase by nearly 100%!
But is this really a bad thing?
The error, in both cases, is confusing a 3-state variable for a 2-state variable. There are really three states: poor-living, non-poor-living, and dead. Looking at poverty rates fails to consider the dead state.

Saturday, July 11, 2020

Can We Depend on GDP Alone For Measuring Growth

The following is an excerpt from the book Hit Refresh by Satya Nadella.

Would you prefer to have $100,000 today or be a millionaire in 1920? Many would love to be a millionaire in the previous century, but your money then could not buy lifesaving penicillin, a phone call to family on the other side of the country, or many of the benefits of innovations we take for granted today.

Government should not have the goal of increasing GDP. It should try to improve the technology, business, freedom for the people, and make people lives more comfortable. With that, if GDP increases, it is fine. If not, that should not be a problem. Government should not do anything that increases GDP but reduces anything that impacts people.

Saturday, July 04, 2020

Ad by a state government on no Discrimination

Excerpt from an Ad by a state government, who files cases on people for their facebook posts.
No discrimination by caste and religion
50% Reservations to SC, ST, BC and Minorities
The above two lines are one below another in the ad (and not in different pages). Somebody, please explain them the meaning of "No discrimination by caste and religion".

Saturday, June 27, 2020

Business by Govt vs Private

Indian government filed cases against Telecom companies like Vodafone, Airtel and Jio saying, they have to pay tens of thousands of crores as dues. When the same rules are applied to few other companies (called as Public Sector Undertaking) like Power Grid Coporation, GAIL India and Oil India etc., the dues would cross one lakh crore. But, those companies don't need to pay.

For those, who say that, the original case was related to Telecom companies, the other companies also bought spectrum and the exact same rules can be applied. If it is unfair for the PSU companies, it should be unfair to Vodafone, Airtel and Jio as well. 

Of course, if government wants to change the rule, it would change to something like, if the revenue from X business is more than Y% of the company, then this rule is applied, and they carefully choose X and Y, in such a way that, the companies that they want to target would fall in that category. 

I don't see BSNL in the list. Does it mean, BSNL paid all the taxes and fees as per the rules set by the Govt, just like it set to any other private telecom company? If it had really paid the taxes and fees as per the rules, what is the overall profit (or loss) of BSNL? If it is in losses, does it mean, a common man has to pay the tax/fee because of the mismanagement of the company? 

All the state governments run the buses. If any private player wants to run a bus, first they have to get a permit. The permit amount is pretty huge. Apart from paying the permit amount, they need to get the approval from the concerned minister/official. That permission would cost them a lot unofficially. Government run buses won't pay any permit fees whatsoever and obviously, they don't need to pay any amount unofficially. But, the private bus operators have to fight with the government run buses on the fare. On peak days, when the private bus operators increase the fare, we would crticize them for exploiting. 

Air India is in losses. Still common man is paying for the losses of running Air India. If the same thing happens to private operators, the company would be closed down, like King Fisher or Jet Airways. Only the shareholders of the company would lose and not the common man. 

The profit and losses are calculated differently for government and private companies (May be except in the sectors that are reformed like Coal etc.). When the government industry is trying to get something out of the natural resources, the revenue minus the expenditure is considered as profit. Whereas, for the private industry, one has to deduct the license fee to extract the natural resources, which is typically more than all other expenditures. When that government industry is in Profits (on books), the employees would fight for increase in the salaries, bonus etc., saying it is in profits. Many times, the profit that they say the got is far less than the license fee they would have got, had they given to a private player in fair means. 

Everyone says, Private companies are exploiting. But, in reality, Government is exploiting private sector and trying to show as if the private companies are demons. 

Eventhough India got partial Independence in 1991 (No. It did not get it in 1947), still Government is trying to reduce the freedom of the companies with something or other.

Saturday, June 20, 2020

Banning Chinese Products

These days, I am seeing people destroying Chinese products in the news.
If they are destroying something that is not working or if they are doing for some publicity, then I don't have any comments.
Otherwise, only the person who owns that product is at loss and nobody else.
If you don't like China, then you may not achieve anything by blindly banning Chinese products. If you are planning to buy some product, and for the quality that you are expecting, if a Chinese product is cheaper than other product, then buy the Chinese product. Whatever the money that you saved by that, donate it to any person/organization/entity/government that you think would make India better than China. If a Chinese product is more expensive than the other product, there is no point in buying Chinese product.
If China is selling weapons, there is nothing wrong in buying weapons from China and fighting with them by using the same weapons. In the same way, if we are getting some advantage by transacting with China, transact with China, and use the advantage against China (if you don't like China).

Sunday, May 31, 2020

Airtel Support - The most efficient support system in the world

Airtel is the one which has the most efficient support system in the entire world. [If you have not got it, it was a sarcastic comment.]

There was no way I can raise a complaint with Airtel DTH. Calling customer care says, install Airtel Thanks App. In Airtel Thanks app, there is no way to raise a complaint. They don't respond to mails.

The highlight is the IVR feedback system. In any IVR feedback, I typically hear two types of feedback.

First type is, press 1, if your problem is resolved, and press 2, if your problem is not resolved.

Other type is, press between 1 to 5, based on your level of satisfaction with this issue, where 1 being the lowest and 5 being the highest.

Even if the numbers vary, these are the two different options that I see in most of the IVR feedback options.

Airtel is having third type of feedback system.
Press 1, if your problem is resolved.
If you are unable to do A, B, C, Please do X, Y, Z. Press 2.

Hats off to Airtel for having such a brilliant feedback mechanism.

Saturday, May 30, 2020

Rules in Different States During Lockdown

The present rules of different states is like, each state is like a different country and issuing visas differently to other states.

Anyone can visit Telangana without any issue. But, if they have any symptoms, then they would be taken to institutional quarantine. Otherwise, they can go home.

In AP, one needs to register in Spandana App. Only after it is approved, they can book the tickets. If the person is coming from Chennai, Mumbai, Delhi, Gujarat, Rajasthan or M.P, then they have to mandatorily go for institutional quarantine for 7 days. If the person is coming from other areas, they can go home for home quarantine for 14 days, if they do not have any symptoms.

For Karnataka, the process is much more complicated and one has to read all the rules before visiting.

If a person who is coming from Chennai or Mumbai wants to visit A.P., then they should go to state like Telangana and from there, if they go to A.P., then they don't need to be in institutional quarantine. Otherwise, they would be in institutional quarantine for few days.

I see few forwards with one or two line rules for each state. The rules are much more complicated than that. If you are travelling to any state, please read all the rules of that state before the travel. Many times, the rules vary almost every week.

You can read the rules of different states from https://www.goindigo.in/information/state-regulations.html

Tuesday, May 26, 2020

Travel from Chennai to Hyderabad on the first flight after lock down

I travelled from Chennai to Hyderabad by the first available public transport after the lock down which does not require any government approval. The following is my journey details, which I am mentioning here, so that, those who are planning to travel (in the coming days) can be prepared.

Flight booking

I booked Indigo flight for the afternoon of 25th May. Late night of 24th May, I received message saying, the flight has been cancelled. I tried to rebook the flight, but, it was giving different errors each time. I tried to cancel the flight and get refund of the money. After undoing the checkin, that worked.  Later I realized that, I should not have done that, if the plan is to rebook the ticket in a week. Because, when we cancel the flight and ask for the credit, Indigo takes a week to credit the amount in your shell. So, within a week, if you have to book, you cannot use that. Also, the credit amount should be used within a year (and probably by the same passenger). So, not a good option, if one does not plan to travel that often. Fortunately, in my case, Indigo customer care helped me to change the flight to 25th May at 8:50 PM.

To Chennai Airport

In Chennai, no public transport was available, no cab/ola/uber available. Autos were very rare. You may need to be lucky to spot one. I started at home at 5 PM, and walked a lot of distance and found one unofficial transport vehicle who dropped me near by airport for Rs.800 for 5 kms. Even then, I had to walk a lot of distance to go the terminal with heavy luggage. During normal times, Ola cab used to come to my house and drop near the terminal for a charge of Rs.150.

In Chennai Airport

In Chennai Airport, they did thermal screening. Everyone had to do web checkin before.
Indigo expected everyone to take printouts of the boarding pass and luggage tags. But, they were not required. They gave me a  new boarding pass (since they were unable to scan my paper boarding pass) and they put their own baggage tags. In the ticket instructions, they said, they don't take extra luggage charges at the airport. My luggage crossed 6 kgs than their limit and they charged Rs.2400 for that, and they took credit card payment.

Flight got delayed and it started at 10.30 PM instead of 8.50 PM.

In Hyderabad Airport. 

Flight landed before 11.30 PM. First time, I saw people in India getting down in the order. Of course, as soon as the flight halted, everyone stood up to take their luggage and started waiting to go first. The flight attendant announced three times to get down in the order of the seat numbers, and people started getting down in the order of their seat numbers.

While coming out of the airport, they did thermal screening. If the temperature is fine, they let go without saying anything. By 12 AM, I was near the cab point and tried to book Ola/Uber and I could not get anything. After some time, I tried to check other cabs. Few cabs operated like share autos, taking three different passengers, and charging each one Rs.700-1000. I could not get anything as the cabs were very less. After some time, there were no cabs at all.

I went back and sat in Airport chairs till 4 AM, when I was asked to vacate the chairs. They said, nobody is supposed sit in the chairs as people would be coming from the arrival flights, and they expect everyone to go without waiting there.

I took free shuttle to the Airport bus station. There, I started waiting along with many other people including those who came in the same shuttle. When I casually asked for a cab, they said, one was available and I took it immediately. They charged Rs.700, which was usual charge. I wondered whether I was lucky to be the first one to ask casually or I was the only person there who was waiting for a cab.

By 5 AM, I reached my final destination. Total time taken was 12 hours (from 5 PM to 5 AM).

From the political angle, it was like, transport was started by Union (Central) Government and not started by state government. You go and figure out what to do. 

Saturday, February 01, 2020

To all the protesters of the CAA

To all the protesters of the CAA,

I appreciate your fight against the one time discrimination of non-Indians in the name of religion.

Can you also please fight for Indians who have been discriminated by the government based on caste, religion, region and many others since Independence with no plan to end the discrimination even in far future?