Monday, December 21, 2015

Sharing Is Caring

As they always say "Sharing is caring",  However, it struck me that for new generations, specially with those heavily using Facebook, that it might need emphasize on the different meanings that the term sharing started to have.

"Sharing is caring"  means allowing others to use or consume something that belongs to self. usually food or toys among children.

The term has evolved in the modern Facebook sphere. Sharing on Facebook started as actually something similar. You find something nice, you share it with others because you care about those others.

However, when "others" become a mass, things gets different.  You can care about someone but you cannot care about "others",  that's why we call them "others". The caring implied by sharing drifted from those to whom we share,  to the person who is involved in the topic of sharing. Or the voice of original author of something, who will be offered more exposure and outreach by you sharing his posts.

Sharing, in the Facebook world, has lots of meanings, including: contributing into someone's effort to voice his thoughts out to everyone.

Saturday, October 24, 2015

Android Marshmallow highlights

Nearly a couple of weeks ago, I got system update of Android 6, Marshmallow on my Google Nexus 5. Having system updates early is one of the things I like much about  Google Nexus devices.

There are several wonderful things in the new android, but I was eagerly waiting for this update, specifically for the selective permissions module. Lots of android apps use lots of excessive permissions. too much than necessary IMHO. However, let me tell you about how I found things.

One of the things I liked a lot since my last version of android is the launcher app menu,  I used to have to swipe left several times to get to apps with names starting with letters coming late in the alphabet (Z, x, S,  and arabic names).  Android 6 default app menu avoids this horizontal scrolling. and:
1) Uses vertical scrolling which is more natural and usable for users
2) Allows you to search apps, to reach the app quickly by typing a couple of letters form its name
3) The most frequent used apps are listed in the top row, to make them even more reachable

Permissions Revamp. and this is the big thing in this update.  now we can have selective permissions per app.  it is no longer all or none permissions.  Android users have suffered from apps asking for excessive permissions all the time. like this one:
Magic Kinder, is an app that is promoted by the kids candy known as Kinder Joy, the app supposedly have stories and games for kids.  however, I find this too much permissions to ask for:

So, how permissions go in Android 6?
At first,  when you update to 6, all already installed apps will have all permissions they had gained, but you now can list those permissions and revoke them, through settings > apps:

Let me elaborate on the effect of this making use of Instagram app:
Instagram needs access to the camera by nature.  it also needs access to the file system (to let you share from your gallery),  and access to location (to specify photo location on map)
What if i didn't want any of those 2 features?. Actually I want only the camera

So Instagram will ask for further permissions when needed, and I do not have to grant those permission to the app any more

And this is quite good for me, I do not want to share location or post from gallery

TrueCaller is also one of the service I that used to use through the browser, and not the app.  the reason is that I do not want to expose my contacts to any app,  specially if they were being used to build a global directory.. however, i'm ok with sharing information about what number is spam and what is not, and I could also lookup the names of some numbers. But in the end,  that was an application that can never be installed.

Now I have Truecaller installed and handy, without granting it access to the contacts.   the side effect is that it assumes that any calling number is a new number, since it cannot reach the existing contacts to know if it does exist to know before or not. so now, whenever i get a call, I get the name from the phone book.  and the name in true caller directory. not convenient for most end users, but doesn't seem bad to me

Android provides a wonderful way to review the apps utilizing permission on every component of the device.  this allows you to easily review all apps that has access to the camera for example (I noticed that most of apps wanted access to "contacts" although i'm sure i do not need such a thing)

There are other points in Android Marshmallow including performance and battery consumption improvements.  but I will stop at this point

Monday, September 14, 2015

Converting a batch of files of csv format to xls or xlsx

While working with data, we tend to deal a lot with CSV files. It is more efficient and trivial to manipulate csv data either through command line tools or through programming languages like ruby.

However, occasionally we need to convert files to MS Excel format before sending them to 3rd party.
Gnumeric is a wonderful opensource spreadsheet program.  It contains a command line convertion tool called ssconvert that can be used to perform direct conversion among lots of supported formats easily from the command line.

For example, conversion from csv to xlsx can be done via
ssconvert  file.csv file.xlsx
ssconvert  file.csv --export-type=Gnumeric_Excel:xlsx
It can be installed in ubuntu via
apt-get install gnumeric
In order to convert lots of files, I wrote a simple bash script that will process all csv files in the current directory and generate the corresponding xlsx files.  The script came pretty handy in data preparation. I believe i can be helpful to many people

This can be simply downloaded and placed at /usr/local/bin,  and be used directly any where.

Friday, April 03, 2015

Google Adsense Sensitive Categories

According to a note from Google Adsense website,  starting last month, they rolled out new beta inventory of ads that might be bothering to some people, which is "Social Casino Games".

This includes poker, bingo, lotteries among other games.

If you are like me, do not like showing such ads even with the slightest possibility that they could be seen by the ads engine as relevant to some of your content,  you can opt out of them.  Simply by clicking "Allow and block ads" at the top, then choosing "Sensitive Categories", and block the categories you do not like. (see the image below)