Tuesday, September 1, 2015

Sexism in the viral social media "motivational quotes"

My Sri Lankan Version *
Your naked body should only belong to those who fall in love with your naked soul.” ― Charles Chaplin.

The above is a message circulated as a viral image by many in Facebook. The message comes written on top of a considerably attractive female, subtly sexualized and directing this advice towards the female members of the network.

As pointed out by many, your body belongs to you; not to anyone else. Nevertheless, just to balance, I have  composed and released this image, which is a Sri Lankan and less sexist version of the original post.

The original viral image

We have a long way to go, to grow up and overcome this imbalance.

 * Special thanks to Kusa Paba crew for the image of the man in the photo. No copyright violations intended.

Google+ cannot get creepier

Google+ just keeps repeating,
"Complete your profile
Are you in a relationship?
Have a special someone? Let the world know."
Why should I "let the world know"?

They should at least have made it less creepier by mentioning "let your friends know". Also showing 75% just to induce you to make it 100%.

Sunday, August 30, 2015

EMDC Summer Event 2015


I represented EMDC 2012 batch at the EMDC Summer Event 2015, in Fejan island, Sweden. The event was targeted towards my juniors, EMDC batch 2014. I presented the thoughts from our batch, as well as my research work at the event.



Saturday, August 22, 2015

Differentiated Pricing and the Evil in it

The bill from the repair guy, who charged 200%.
You may have heard the popular finding - you should clear the browser cache before attempting to book flight tickets online. This is because differentiated pricing. The seller of the product or service increases the price based on the probability of the buyer to actually buy, for a given price. It is in fact not just online. It has been around for a long time, and those who are not into bargaining (i.e. innocent people like me), are often the victims in this bargain-centric world. Why do we fail in this, when the seller in many of the cases can be just a vendor who does not even have the education and experience we think we have? While we think we are polite and nice by agreeing to the first price in such a negotiation-based scheme, the seller just assumes we are just plain stupid, while he/she is being a smart ass.

Yesterday, we met were met with a similar situation, where a Portuguese "RL- ELECTRICIDADE E CANALIZAÇÃO" charged 43.80 Euro, where he should have just charged just 22 Euro! That means, the double price. He is Rui Pedro B. Lopes, with the phone number 915 282 877. Do not  call him, specially if you are a foreigner. It was just fixing a bolt in a bed, and changing two bulbs. He charged 37.50 Euro as the service fee, where the other shop near by said they charge only maximum 25 Euro per hour. He did not even have to spend an hour, and he claimed, the higher price is because we called his "24 hours hotline". :P Come on, that was noon, and in the site he has listed as "preços reduzidos" (reduced price); not some VIP 24 hour service. Moreover, he charged 6.30 Euro for a single bulb, which we found out in the near by shop later that it is just 1 Euro!Worse is, the bulb stopped working last night (that means, within just a few hours).

Above is the bill he produced, when we asked for a bill. See how he has included some random "technical jargon" instead of being concise, and breaking down the price as "Service Fee - 37.50 Euro; A regular electric bulb - 6.30 Euro". He was also saying "You must fix the entire bed" He really said that attempting to make us spend more. I should note the observation that he resort to do a differential pricing, judging from the look that we are innocent foreigners with not much clue on the local pricing.

Coming back to the core of the blog post from this specific case that induced this long post. I remember, a video I watched recently (See the video from the 0:22 to come to the point). Here you see how the vendor increases the price upon seeing a foreigner. This one is a scripted video for entertainment. Nevertheless I have observed this in China and India. Now also in Portugal. Also I have observed this in my country (Sri Lanka) for foreigners. Sometimes this is very obvious in my country where the entry tickets for parks and museums tend to be 100 times more expensive than that is for the locals. This is something approved by the government and legal. When I think about it, I hate this differentiated pricing, whether it is used against me as a foreigner in another country, or used against a traveller in my own country.


Watch the video from 0:22

This system works under the assumption that foreigners are vulnerable and are often willing to pay more due to the lack of knowledge of the system and language. Even inside the same country, I have noticed this when I speak in English vs Sinhala, the local language. If you speak the local language, chances are high that you will be in a better position though you are a foreigner. In India, I learned the hard way that you must do some bargaining to not end up paying 10 times the price for the three-wheeler drivers.

Belgrade in the early morning
Sometimes the exchange rates confuse a bit as well. When I went to Belgrade, Serbia, immediately after getting down from the bus, I went to a cafe and ordered a cup of coffee and a chocolate croissant. The cashier said 300 Dinar. The cafe did not look like a decent one, and surely the cashier lady was an immigrant. Not that I am judging the immigrants - but Belgrade in the early morning was full of homeless people sleeping in the public parks and train station entrance. Majority of them being immigrants. Not sure how will they be integrated into the society to provide a productive input to the system. I was thinking how much will be 300 Dinar in Euro! I knew for a fact that 1 Euro equals 7.55 Croatian Kuna, as I lived there for more than a week by then. So I was worried whether the cashier lady is attempting to cheat me. I asked for a receipt. 

Obviously the lady pretended not to understand me, regardless of my body language and pointing to the computer/calculator that prints the bills. Eventually she gave up and printed me the receipt. It was 285 Dinar. So I paid the 285 Dinar.  I could not understand a thing as it was printed in Cyrillic scripts though. If it was in Latin script, I would be able to understand as many words such as coffee/cafe are same among many European languages. Serbian is written in both Cyrillic and Latin scripts, while Croatian is mostly written in Latin script, based on my observation. Interestingly both of them are same language technically, while politically they are two different languages.

Still I was a bit worried how much would that be in Euro. The coffee tasted awful - probably the worst coffee in my life. I left the cafe shortly. I started walking towards the meeting point, where my friend would meet me. On the way, I showed the flashing exchange rates. 1 Euro = 119 Serbian Dinar. Then I did a quick conversion to find out that I spent just 2.40 Euro. Not bad. Seems I was not cheated this time (she obviously just tried to charge me 15 Dinar extra, that would be around 0.13 Euro).

I learn new things with each travels. I meet many kind people along the way. I also meet many opportunists who attempt to earn more from the foreigners and unsuspecting victims. It can be online, it can be in the streets. I dislike the bargaining and differentiated pricing. However, that is how "the system" works.

Tuesday, August 18, 2015

Error messages do lie..

Probably this is a trivial error. But when I was trying to deploy a file from the local file system to Hive, it was always giving the below error.

It was clear to me that the files indeed exists in the location /home/ec2-user/datacafe/. However, finally I realized that this is because that Hive client was unable to look beyond the hadoop directory. That means, when I moved the files to /home/hadoop/datacafe, and pointed to them, Hive easily found them! Here /home/hadoop was the installation directory. So this is rather a simple permission issue than a more complicated issue I expected it to be.


21:19:09.380 [main] INFO  edu.emory.bmi.datacafe.hdfs.HiveConnector - Successfully written the output to the file, patients.csv
21:19:09.874 [main] ERROR edu.emory.bmi.datacafe.hdfs.HiveConnector - SQL Exception in writing to Hive Table: patients
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException Line 1:23 Invalid path ''../ec2-user/datacafe/patients.csv'': No files matching path file:/home/ec2-user/datacafe/patients.csv
    at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:231) ~[hive-jdbc-1.0.0.jar:1.0.0]
    at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:217) ~[hive-jdbc-1.0.0.jar:1.0.0]
    at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:254) ~[hive-jdbc-1.0.0.jar:1.0.0]
    at edu.emory.bmi.datacafe.hdfs.HiveConnector.writeToHive(HiveConnector.java:119) ~[datacafe-server-1.0-SNAPSHOT.jar:?]
    at edu.emory.bmi.datacafe.hdfs.HiveConnector.writeToWarehouse(HiveConnector.java:60) [datacafe-server-1.0-SNAPSHOT.jar:?]
    at edu.emory.bmi.datacafe.hdfs.HiveConnector.writeDataSourcesToWarehouse(HiveConnector.java:50) [datacafe-server-1.0-SNAPSHOT.jar:?]
    at edu.emory.bmi.datacafe.impl.main.Initiator.initiate(Initiator.java:71) [datacafe-server-1.0-SNAPSHOT.jar:?]
    at edu.emory.bmi.datacafe.impl.main.Initiator.main(Initiator.java:39) [datacafe-server-1.0-SNAPSHOT.jar:?]
21:19:09.881 [main] INFO  edu.emory.bmi.datacafe.hdfs.HiveConnector - Successfully written the output to the file, slices.csv
21:19:10.097 [main] ERROR edu.emory.bmi.datacafe.hdfs.HiveConnector - SQL Exception in writing to Hive Table: slices
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException Line 1:23 Invalid path ''../ec2-user/datacafe/slices.csv'': No files matching path file:/home/ec2-user/datacafe/slices.csv
    at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:231) ~[hive-jdbc-1.0.0.jar:1.0.0]
    at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:217) ~[hive-jdbc-1.0.0.jar:1.0.0]
    at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:254) ~[hive-jdbc-1.0.0.jar:1.0.0]
    at edu.emory.bmi.datacafe.hdfs.HiveConnector.writeToHive(HiveConnector.java:119) ~[datacafe-server-1.0-SNAPSHOT.jar:?]
    at edu.emory.bmi.datacafe.hdfs.HiveConnector.writeToWarehouse(HiveConnector.java:60) [datacafe-server-1.0-SNAPSHOT.jar:?]
    at edu.emory.bmi.datacafe.hdfs.HiveConnector.writeDataSourcesToWarehouse(HiveConnector.java:50) [datacafe-server-1.0-SNAPSHOT.jar:?]
    at edu.emory.bmi.datacafe.impl.main.Initiator.initiate(Initiator.java:71) [datacafe-server-1.0-SNAPSHOT.jar:?]
    at edu.emory.bmi.datacafe.impl.main.Initiator.main(Initiator.java:39) [datacafe-server-1.0-SNAPSHOT.jar:?]