Sunday, April 20, 2014

Make Apple Mail on Mac OS and iOS play nice with gmail category filtering



Columbia Email System Moves to gmail


A couple of months ago, the Columbia University email system was moved over to Google Apps for faculty and it significantly affected my email workflow. The move meant I now have three gmail accounts,  the other two being my personal email account, and one associated with the company I founded, Infinio. My Columbia email account has been my primary email ID for over 12 years now though, and I receive the bulk of my email on it. And I really mean bulk. 

Inbox Tabs: A fantastic feature


I had heard about this gmail feature called inbox tabs, but never used it since my other gmail accounts did not receive all the social media/promotion/forum emails etc. Once the Columbia email moved to gmail, I decided to turn it on. I woke up the next day and discovered that I was neither that popular nor particularly important - and it was great! My primary inbox tab had only one email in it, whereas normally my ritual after opening my email client the first thing in the morning was to sort through about 50 messages which fall into the aforementioned inbox tabs. Note that these are not spam emails, but emails I am mildly interested in and occasionally useful. Google seemed to be doing a very good job of filing the messages appropriately and only occasionally I needed to refile a message back to by primary tab.

Switching Clients and missing Mail.app


I liked the inbox tabs feature so much that I immediately switched over to using the gmail web client on both my Mac as well as my iOS devices. I searched around for other email clients that used the inbox tabs feature offered by gmail but found nothing aside from MailPlane which is essentially a wrapper around the gmail web client, though very nicely done. While getting a clutter free inbox was great, there are features in the Apple Mail client that I started to miss.

I have been an Apple Mail user for over a decade now, and while it has many faults there are many things to like about it, especially compared to web based gmail clients. This applies to both the Mac OS client as well as the iOS one. Some of the features that I like in Mail that are missing from the gmail clients are:
  • Unified Inbox. Switching between my 3 accounts to download and check email is annoying. I know that it helps some people to context switch and enforce discipline but it's just not for me.
  • Smart data parsing. I like the feature where the Apple Mail clients automatically parse contact details, dates, phone numbers and addresses and make them useful to add calendar entries, make phone calls, open up the maps app etc.
  • PDF signing. This is very important for me. The Mac OS Preview App has a very nice feature for easy PDF signing.  I get several PDF documents that require my signature, wearing both my Professor hat as well as the Infinio Board member hat. What makes the Preview feature even more useful is that you can invoke the app from within an email, sign the document and when you are done signing Preview is intelligent enough to ask you if I want it to be emailed back to the sender. This feature is enormously useful to me.
  • Much better HTML rendering on iOS. The Apple Mail client renders HTML emails much better than the gmail client. I almost never have to go into an email and manually zoom with the Apple Mail client, whereas I frequently need to do it using the gmail client.
  • Other email IDs. I have an iCloud email ID that occasionally gets something useful. Having another email client just for that seemed wasteful.
  • Inline display of attachments. The Apple apps display/play/preview all sorts of attachments very nicely, including PDFs, Office documents and voicemail sound files. With the gmail client the process is cumbersome.
I kept searching for solutions that would let me use the category tabs with Mail.app but found nothing. Until yesterday where I chanced upon this post by the helpful people over at AirMail.

Labels, Filters and getting the goodness of gmail categories with Mail.app


The process you need to follow is pretty straightforward. It has been described in detail, including screenshots in the AirMail blog post I mention above, but the steps are below:

  • Go into every gmail account that you use and setup labels. You can find the labels tab when you click the "settings" option in the gears icon you see on the top right right corner of the gmail web client.
  • Setup a label for every gmail category tab that you want to use, i.e., social, forums, updates, promotions. You can setup the labels directly or create a top-level label called "MyLabels" or something and nest them under that.
  • From the same settings page, click on filters and setup filters for every category tab that you want to use.
  • Click on "create new filter" and in the "Has the words" field add the text "category:promotions" etc. like the screenshot below (note the first time you create a filter you won't see the "category:promotions" on top of the screen like below, don't worry about it).

  • Click continue, and on the next screen check the option "Skip the inbox (Archive it)", "Apply the label" - select MyLabels/Promotions and check "Also apply filter to matching conversations" if you want the filter to apply for your previously received emails.

  • Do it for every category in every gmail account that you want to filter.
  • Your email accounts on Mail.app on MacOS and iOS will now show folders under the individual gmail accounts that are MyLabels/Promotions etc.
  • Optionally, on Mail.app on the Mac, create smart folders that collects all your "promotions", "social" etc. folders into one unified folder.
  • You now have a clutter free Mail client on your Mac and iOS with all the benefits of category filtering from gmail. 

    So far the system is working great for me and I am back to using Mail on the Mac as well as my iOS devices and have a relatively quiet, clutter free and unified inbox.

    Update: A comment by Cathy Kapanadze below adds an important improvement to the setup, that of the occasional mislabeling of emails by gmail and retraining the system. I am reproducing the comment here:


    Hi Daniel,

    I found a solution to this. What I did was create smart mailboxes in my mail app for filtering. Then if I notice something in Promotions, for example, that I want to have in inbox, I drag and drop it to my "inbox" mailbox. Then I go on gmail.com and click on "promotions" tab, which ONLY has the mail i wanted to move to inbox. I then move it to the primary tab and say I want to do the same for other emails from this sender.
    Hope it works for you.

    -Cathy. 

    Wednesday, March 26, 2014

    More exposure for Associates? A little data analysis

    The ongoing T20 world cup has thrown up an interesting issue around the participation of Associate nations at these events. We have seen two Associates, Ireland and Netherlands, play one of the most incredible  and thrilling T20 games ever, saw the unbridled joy when Associates Ireland and Hong Kong beat full member nations and the magical reception that the Nepalese team got when it returned home. The Associates have brought a lot of joy to their fans.  Conversely we have seen full member nations play a string of boring, one-sided games. Advocates of the Associates will say that this is proof that more Associates should play, whereas nay-sayers point out that even club level tournaments throw up thrilling games, doesn't mean club teams belong at the highest level. 

    I decided to look at the question of whether the Associates belong or not. My contention was that Bangladesh's performance (over the years) has not made a strong case for the elevation and more participation of Associates. Jarrod Kimber immediately jumped on me by saying that if I think "Bangladesh is the reason associates are held back, you're way off" .

    My point was not that Bangladesh is the reason they are held back, but that it doesn't help the cause of the Associates when people point out that Bangladesh got elevated to full member status and see how poorly they continue to perform.

    I did a little study of the performance in ODIs of the last three Associates that have received full-member status, Sri Lanka, Zimbabwe and Bangladesh. You can run the queries yourself using StatsGuru here:

    Sri Lanka
    Zimbabwe
    Bangladesh

    I extracted the win/loss record for every team and constructed a running total of their performance by awarding +1 for a win, -1 for a loss, 0 for n/r. I gave 2 for a tie because I think getting a tie deserves something more (also it is statistically insignificant as ties are few and far between). Some points before we start looking at the graph. If we start counting from the time a nation started playing ODIs regularly (i.e. more than one every year), it took Sri Lanka 3 years to reach 50 ODIs (1982-1985), Zimbabwe 4 years (1992-1996) and Bangladesh 5 years (1997-2002).

    I have plotted the results for the first 290 ODI games for each nation (the number played by Bangladesh currently).

    What you can observe from these curves are the following points:

    • Zimbabwe had the fastest start amongst the three. They had already "stabilized" by the time they reached their 50th ODI and were competing at an even keel internationally for a few years. However, around 2001-02, when the political crisis hit Zimbabwe they have gone into a downward spiral and have never recovered.
    • Sri Lanka hit their stride around their 150th-200th ODI (mid-90s, with Ranatunga, Aravinda and Jayasuriya getting center stage) and have been world beaters ever since. The graph looks even better in the part that I did not show, post 290 games.
    • Bangladesh have been the slowest starters. They showed signs of making the transition to being one of the elite teams around the 150th ODI mark, 2007,  same as Sri Lanka. They beat India in the World Cup and were regularly beating top teams. However they have regressed since then and the trajectory is again downwards. There is no political turmoil unlike Zimbabwe so it is difficult to pinpoint the reason for the lack of progress. 17 years of regularly playing ODIs as a full member nation and they are still performing at the same level as Sri Lanka and Zimbabwe were performing in their first 5 years as full member nations.
    Update. Going back and reanalyzing the performance of both Sri Lanka and Bangladesh, the following fact emerges:
    • Whatmore was the coach of both Bangladesh (roughly points 90-160 on the x-axis) and Sri Lanka (160 onwards) when they showed maximum progress. Sri Lanka have sustained it since the Whatmore-era, Bangladesh have not.


    I think Sri Lanka and Zimbabwe have shown that giving more exposure to Associates can enable them to make rapid strides. Bangladesh is an anomaly to this, and I don't know the reasons for that. It is for you to speculate.  







    Friday, February 7, 2014

    Save the Live Scorecard

    Cricket fans have something unique in the world, Cricinfo. No other sport has anything remotely close - it is the true voice of the fan.

    Even though it is now ESPNCricinfo, Cricinfo from all accounts has editorial independence and always speaks for the fan. It gives a fair airing to all sides of issues - just in the past few days, Cricinfo has aired completely different perspectives on the Kevin Pietersen issue. While being hugely critical of the position paper that recommends changes in the world cricket structure, in the interest of fairness Cricinfo carried an interview explaining the perspective of the big-3. Such examples are replete through Cricinfo's history.

    Recently Cricinfo celebrated it's 20 year anniversary, and scores of articles in the celebration page show how much Cricinfo is loved around the world, by fans and players alike. The growth and popularity of Cricinfo is intimately tied to the live scorecard, and it is no accident that Cricinfo launched the 20 year celebration with the story behind the live scorecard. 

    Now because of an absurd ruling of the Delhi high court, the live scorecard is under threat. If the ruling is allowed to stay, it is a slippery slope that will let corporations buy Internet rights for any "event", and prevent a free flow of information and data. Cricinfo has never in it's history charged fans for the live coverage - not on the web, not on any apps. It is a service that is provided to the fans free of charge. Nor has it, to my knowledge, ever prevented any rival site from providing a live scorecard service.

    The Times of India has a very good article explaining the issue.

    Please join me in protesting this absurd ruling, and urging the Supreme Court of India to dismiss the case. The issues go beyond the live scorecards that we see on Cricinfo, Cricbuzz and other sites - but the near term objective is the interests of us cricket fans.

    If you agree with the thoughts above, please sign the online petition on avaaz.org. Click below to sign the petition. 




    Petition



    Disclaimer: I am not involved with the ESPNCricinfo management in any way. I was involved in the early days of Cricinfo and I remain a fan.