Tuesday, January 10, 2017

Jallikattu needs your support

Myth: Jallikattu is a bullfight

Jallikattu is NOT a bull vs human fight. It's a game where the players are required to embrace the running bulls by hanging on their hump as far as possible.

It's NOT a bullfight and the bulls are not injured (or) killed later on. This is in sharp contrast to the Spanish bull fight where the players insert a sword into the spine of the bull!

So is Jallikattu cruelty-free? 

Maybe not. But lets take a step back and think through this.

There have been on field deaths in Football, Cricket, Boxing etc., So did authorities try to make sure the game is, even more, safer (OR) did they ban those sports?

Yes if there are rules there are going to be rule breakers as well. So should we discipline rule breakers (or) ban the entire sport just by looking into few exceptions happened in the past?

There are quite a few rules to be followed in Jallikattu as well. Just in case it isn't followed should the protest needs to be for implementing the rules (or) banning the sport? 

Doesn't it clearly say there are some misplaced priorities here?

When important stakeholders (Farmers, people who love & own bulls, researchers) time & again say

1. Ban on Jalikattu is actually against native breeds,
2. Lots of native breeds have already become extinct & this ban on Jallikattu will probably lead to the remaining 5 native breeds being extinct too,
3. There is a bigger politics behind this move etc.,

Did Peta India supporters / Media take any effort to research on that angle and provide their findings? (or) where they even ready for a healthy debate with those stakeholders on that topic?

Having a different point of view is never an issue but not willing to research, learn, debate and then be ready to change stance based on facts is what is worrisome.

Please don't blindly believe the media & NGO behind this move. We need to save our native breeds. Let us not give away our treasures to groups who are masters of playing "Divide & Rule" game.

Now if our great-grandparents are alive they wouldn't allow this to happen. Why? Because they know the effort, pain, sacrifice they all had to make to get the freedom for India from a "divide & rule" group earlier. Even before our great-grandparents realized the big picture that group had spread their wings all around the country and colonized India.

Jallikattu is the pride of TamilNadu, Part of Tamil Culture, Identity of Tamilians. Let's do our bit to save it from corporates with the vested interest.

For further reading:

1. Jallikattu, The Pinnacle of Tamil Culture
2. Rules of the Game - Jallikattu
3. Banning Jallikattu will decimate India’s indigenous cattle breeds
4. [Article in Tamil Language] - PETA is responsible for destruction of native breeds specifically bulls
5. [Tamil] Speech by Mr. Karthikeya Sivasenapathy who is the founder of Senaapathy Kangayam Cattle Research Foundation
6. India is the world’s largest producer of milk. But in 10 years, we will be forced to start importing it. And the Indian cow will no longer exist.

Monday, January 09, 2017

SQL Server Always Encrpted - At a high level how does it works?

One of the excellent feature introduced in SQL Server 2016 is "Always Encrypted". This gives an extra layer of production as no one (including the production DBA's) will be able to access the actual data without having the appropriate key.

An high level overview of how SQL Server 2016 Always Encrypted work:

1. Always Encrypted is a client side encryption technology in which a SQL Server client drivers (In our case, it would be ADO.NET) plays the key role. The driver encrypts the data which application sends in its queries to the database, and it then sends encrypted data to SQL Server.

2. Now when the application retrieves the encrypted data from the database the DRIVER transparently decryptes returning plaintext to the client app. Consequently, SQL Server never sees a sensitive information in plaintext. The keys, in fact, are managed entirely on the client side & the server doesn't have access to the keys either.

3. The key can be stored either in a Windows Certificate (or) Azure key vault,

4. Despite the fact that SQL Server never has access to plaintext and sensitive information, or the corresponding encryption key. SQL Server can query the data and can perform certain computations on encrypted data, namely equality comparison, equality joins, exact match searches or group by operations. - Conditions apply :)

5. There are 2 types of "Encryption Type": Randomized encryption and Deterministic encryption

a. Randomized encryption: This algorithm produces a different cyphertext value for a given plaintext value. Therefore, randomized encryption is more secure but it prevents any operations on encrypted data. Only we can select the column data and display that's it.

b. Deterministic encryption always produces the same cyphertext value for the given plaintext value. Therefore, it enables equality comparison on encrypted data in operations such as exact match searches, equality joins or group by operations.

c. Security Concern?

There is a slight security concern related to deterministic encryption because each plaintext value always maps to the same cyphertext value. An attacker can potentially examine the cyphertext patterns and guess the underlying plaintext values - especially if the dataset is small. For ex, columns contain gender information about male and female. So that's something that we need to keep in mind and be careful while choosing the encryption type.

6. How exactly does the encryption happen?

a. It would download the data of the particular table, encrypts it and then uploads it back. In that process, the schema of the table would change.

b. Encrypted with clause has 3 parameters. The name of the column encryption key protecting data and the column, the type of encryption (deterministic / Randomized) and the name of the encryption algorithm.

c. Always encrypted currently supports just one encryption algorithm, which is AES256.

7. Sample table structure post enabling "Always Encrypted" feature:

8. Web.config changes:

This is the key part because we will see that actually to enable always encrypted add the below value in your connection string.

column encryption setting=enabled;

9. Now application would be able to decrypt information retrieved from the database because it has access to that certificate, that we produce in the wizard. It's basically running on the same machine where the certificate was generated and stored in windows certificate store. And then it is able to decrypt a column encryption key and subsequently, decipher the sensitive information and show it in the clear text as expected.

Saturday, January 07, 2017

Quickly removing spam images from WhatsApp

One of the major issues with Whatsapp is in no time it produces numerous "spam images" which would eat up our smartphone's memory.

Initially tackled it by exiting out of many groups and mostly used it for direct one-on-one conversations alone. It helped in cutting down on those useless images (memes, screenshots, quotes, images with good morning/evening messages etc.,) but it didn't completely solve the problem.

Many of them were either close friends/relatives whom I don't want to block in Whatsapp but at the same time wanted a solution to quickly get rid of those spam images.

After some analysis narrowed down on Magic Cleaner App (Artificial Intelligence powered image recognition system) which seems to do the trick for me.

This App does a decent job in identifying the spam images found the accuracy level to be around 75% - which is pretty good. It identifies and lists all images which it considers to be spam/duplicates. Review & if satisfied delete those (or) unselect images which we want to retain and then remove the rest at one shot.

Are you using any other App for this purpose? Please share your experience on how you are tackling this problem.

Friday, January 06, 2017

Universal Basic Income

"Universal Basic Income" - Heard about this only recently via an Elon Musk interview in November 2016 since then been reading about it. Understood it being discussed for many decades now and certainly not a new idea.

What does it mean?

A government would guarantee citizens a regular fixed sum of enough money to cover a basic standard of living, they can spend however they want, no questions asked.

Majorly critics where saying something on this lines:

1. If we give money for free people will become more lazier
2. People would use it only for drinking / drugs / unhealthy things!

"Maybe 90 % of people will go smoke pot and play video games. But if 10 percent of the people go create new products and services and new wealth, that’s still a huge net win." - Sam Altman, President of Y Combinator, California


1. Finland this week started it on a 2-year trial basis (2000 randomly picked unemployed citizens to get Euro 560 per month)

2. Canada has tried it as early as between 1973 - 1979 @ Dauphin, Manitoba

3. India:

a. It was tested out in West Delhi's Raghubir Nagar Slum from January to December 2011. A household receives Rs. 1000 per month (In the name of the woman of the family). An adult receives Rs. 200 per month and each child receive Rs. 100 per month.

b. Also experimented since 2013 at Panthbadodiya, Indore, Madhya Pradesh.

Being an Indian I was really surprised to know this for the first time (or) rather ashamed I wasn't aware of it all these days. By the way, is this a news to you (or) Are you already aware of this being tested in India?

Universal Basic Income pilot program around the world - http://infozaps.com/images/UBI_Pilots_2017_a.jpg

As the IT is enabling companies to move towards (more) AI / Automation / Robots / Selfdrivingvehicles (ex: cars, trucks etc.,) / removing humans from stores (ex: Amazon Go) / unemployment etc., I believe it makes more sense to explore this option.

For further reading:

1. Finland - Mashable 
2. Canada - Huffingtonpost 
4. Kenya - BIEN (Kenya)
5. Netherlands - BIEN (Netherlands)

Thursday, January 05, 2017

Our experience trying to purchase a product from Zivame

We had some interesting experience trying to purchase a product from Zivame. Let me try to paint a picture about that for you all in this post.

Attempt 1: In person went to their store

A few weeks back during the holiday season, we found this store in Phoenix Mall, Chennai (India). My wife tried out the products of her need and got the model number written down on a card. Looks like they don't store inventory there it is just customer touch point center where they can discuss with store staff to know more about the product and choose what they want but they can purchase it only online.

Attempt 2: Tried ordering online

First on registering got a Rs. 500/- coupon. After adding the required items in the cart proceeded to checkout, provided the coupon code and it showed the revised "order total". So far so good :)

Next, on trying to pay via debit card it resulted in an "Order Failed" status & suggested me to try the checkout process again.

So I decided to try again but the system has cleared out the form and asked me to fill out all the details again (like, email address, shipping address, coupon code etc.,). Filled it all over again and while trying to apply the coupon code it showed an error message saying "Coupon invalid for old user" - I believe they aren't referring to my age here :) Actually they seems to be trying to say I had already made purchases with them so coupon code doesn't apply to me. Pathetic system - they can't even identify whether a user is purchasing for the first time or not!

Maybe some glitch in the system so decided to send out an email about our grievance to Zivame's customer care (customercare@zivame.com).

In few minutes we got the below response from customer care via Freshdesk.com

In that, they have provided a URL stating "Please refer the URL below for any queries which might require your immediate attention:". Interestingly URL shows a Page 404 error.

You have an issue with their website, so write to their customer care, they want you to check a URL, you try doing that and that shows up a classic Page 404 error. So now confused to whom should one complain about this second issue? Zivame or Freshdesk?

I am shopping online extensively since last 3 or 4 years, but this one was the most pathetic experience. Sorry Zivame you seems to have all infrastructure set up just to make sure prospective customers aren't converted into a customer that easily. Thanks!


Ms. Bhargavi from Zivame called a few minutes back and assisted in fixing something at their system level which enabled me to use the coupon codes and place the order successfully. Really appreciate the way she handled the situation & followed up to make sure I was able to place the order.

Saturday, December 17, 2016

Is your SQL Server Database backup good enough? Can it save you during a disaster?

Met a DBA from a company who are in business for ~2 years. During the conversation came to know they have never tested their backup file - not even once. Also, they have very rarely used DBCC CheckDB command. Should I call it as surprised or shocked?

It has become common to see Database Administrators to have fancy DB Backup plan, automate it and that's it. Their idea is whenever the need arises (read as disaster strikes) they can make use of it and restore the database. Although theoretically sounds like a good plan it actually isn't. Why?

All those efforts to take regular backups would become completely useless if those files can't be used to recover the database. One important question missed by many companies to whom I have consulted for - "Do we regularly make sure that we are able to restore a database from our backups?".

Despite backup process has succeeded how do we know it isn't corrupted (or) has some issues which don't allow it to be restored properly?

Our data is only as good as our last restorable backup

The bottom line is unless we do a database restore somewhere, we can't be completely sure that a given backup file is good.

At a high level, based on the business need we should first decide on:
- How much of "downtime" the system can have,
- How much of "data loss" is acceptable,
- After that put together a "Backup plan" to satisfy those requirements.
- Then the "Restore plan" should make sure all backup files are verified to be perfect and restorable in a test environment. Believe one would be already aware & using DBCC CheckDB often if not check the link provided at the end of this article.

DBA need to have a system that allows them to periodically review their plan and ensure they can get everything back up & running again.

Take away: I can't stress enough - Test your Backup file by periodically restoring in a test environment and make sure it's fine.

Recommended for further reading:

1. Paul Randal's The Accidental DBA (Day 8 of 30): Backups: Planning a Recovery Strategy
2. Award winning Maintenance script of Ola Hallengren
3. DBCC CheckDB FAQ by Kendra Little

Thursday, December 15, 2016

Positives of Cyclone Vardah - Unity, Humanity, Self-help

Chennai, Cyclone Vardah (Dec 12, 2016) - In person, have never witnessed anything as close to this in my life. The winds were so powerful it has uprooted close to 15 trees in our colony, the howling sound of the winds blowing was so scary which gives me goosebumps even thinking of it now. It was a complete carnage by "Vardah" on that day.

Our colony had ~50 trees and out of which we lost 15 odd trees now. Minimum of 2 trees has fallen in each street. Colony compound wall has collapsed as one tree had fallen straight over it. Everywhere we were able to see only leaves, fallen branches, fallen trees, cut cables and not an inch of the actual road was clearly visible.

Bad things do happen in the world, like war, natural disasters, disease. But out of those situations always arise stories of ordinary people doing extraordinary things - Daryn Kagan

The positive side of it was from each street at least 2 members automatically volunteered and in no time we were a solid team of 25 to 30 members. It had all walks of people from varied age group and a mix of both male & female. Few started cutting down the fallen trees to make the road accessible for others, few started sweeping the roads, Tea & snacks served by some for the volunteers etc.,

After ~3 days of effort, almost 95% of fallen trees were cut into small pieces by our volunteers and most of the garbage were swept from the road by us. A big share of credit goes to the younger generation (kids of the age group of ~10 to college goers) who were very active and contributed enormously in this effort. Pretty happy that our colony is having a good amount of socially active kids - Healthy sign & feels safe.

The icing on the cake was at the end of the day a colony doctor with the help of few of the volunteers have arranged for TT injection for all those who were in need of it. I myself had cut my left-hand finger and my left foot with a glass piece, got bruises on my leg etc., and was planning to visit a doctor to get a TT as it's been more than 5 yrs since I had that vaccination. It certainly was a nice timely gesture from the doctor.

Overall during this tough times found that,
no specific gender was superior
no specific caste was superior
no specific religion was superior
no specific profession was superior
It's the unity & humanity which won at the end of the day.

Wish it remains the same and am really proud of the way our colony people pulled together to recover from this disaster. Once again I would say there is no better place to live in Chennai than "Park Dugar,  Ramavaram" :)

First time ever I haven't taken any pictures maybe will update this post later after collecting the snaps from others who might have taken it.


These videos from cyclone Vardah might explain the intensity of the winds

1. Car Topples - https://youtu.be/JsSOuwx-gW8
2. Bus Flipping over - https://youtu.be/q7LjSYpiDTU
3. People trying to get to safety from that flipped bus - https://youtu.be/Dw5iY4hXwXw