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.

    Sunday, September 29, 2013

    Sports Body or Banana Republic?

    I think most people remember Saddam Hussain regularly winning "elections" in Iraq with 99% of the votes.

    A person who has done the most public of whitewashings of evidence in recent times is elected unopposed to the post of president of one of the most powerful sports bodies in the world. An office that the Supreme Court of the nation has barred him from holding currently.

    A sports body that is apparently threatening to call off one of the most eagerly awaited sporting contests of recent times because they don't like the person appointed to head the equivalent sports body in the other nation.

    A sports body that gives strict instructions to commentators what they can and cannot say on air. I could never get tired of hearing "Erapalli Prasanna" or "Horizontal Bat Shots" in that delightful Australian accent all day, but due to the spine of one person and the spineless nature of said sports body, fans in a country are going to miss out on one of the most honest and direct commentators in the business.

    A sports body, the association with which diminishes the aura of former cricketing greats.

    A sports body so mired in shenanigans that they make a person who even united fierce political rivals in their condemnation of him, seem like the sympathetic figure.

    A sports body where horse trading is rampant that even factions have their internal fights.

    A sports body where the election is so important that critical people don't even bother to turn up for the AGM.

    It is time somebody called the whole thing nonsense that deserves to be torn up.

    Thursday, August 15, 2013

    The fierce urgency of now

    A few days back, the always excellent Jarrod Kimber had written an insightful article about Australia's search for the next cricketing messiah. One of the themes of his article was that the elevated level of scrutiny in today's world has resulted in young (and not so young) cricketers not being given the kind of patient run that players in the past enjoyed. The media is constantly hounding and twitter is constantly buzzing, affecting both the players as well as selectors.

    I remarked to Jarrod that his point about scrutiny applied to journalists as well - Cardus never wrote under the cloud of real time fact checking and "experts" all round the world streaming in with their criticisms on twitter. Jarrod agreed and he said he has seen a visible change in the press once they came on twitter.

    And then Scyld Berry happened.

    What was otherwise a very good article on Broad running through Australia, was scarred by the unfortunate line "Australia’s experiment with their Asian immigrant population will be shelved.”
    Berry was mercilessly attacked on twitter and on the comments sections of his article. The statement was stupid at best and racist at worst (whether it was intentional or not, the statement to me did come across as racist). The line was hurriedly removed by the Telegraph, with no explanation. Who were they kidding? This action by the Telegraph provoked another round of (twitter) outrage.

    Now under a sudden attack, Berry chose to write a long, convoluted explanation of that line without ever apologizing for it. And because he did it in a hurry, the explanation did much more damage to his reputation as a journalist than the original article.

    First was his mysterious classification of Asian players in the English team. He chose to exclude Nasser Hussain, who was born in Chennai, but instead focused on Monty Panesar, Samit Patel and Ravi Bopara - all of whom were born in England. The only explanation he could come up with is that Nasser has an English mother (so I guess he "looks" white unlike the other three).

    Moving on, he had this line about Khwaja being the first non-white player to turn up for Australia since Sam Morris in the 19th century, "broadly speaking". Ashton Agar was playing all but two tests back and Andrew Symonds, Jason Gillespie and Dav Whatmore fit any definition of non-white players, broad or narrow.

    And then there was this bizarre theory about Khwaja controlling his emotions (presumably because he has had to face scrutiny all his life because he is non-white in Australia) and this control of emotions is the cause of his downfall as a batsman. I guess given Dhoni's extreme control of his emotions it is time for India to stop the experiments with their Jharkhandi population.

    As with most things, the coverup is doing more damage than the crime itself. All because he did not put in the time or effort to write a well thought out and researched explanation. Everything has to be done right now.

    And oh, some of my best friends are journalists.

    Monday, August 5, 2013

    Crisis in Cricket: A Matter of Faith

    When Dhoni hit Eranga for two sixes in the last over to seal victory in the finals of the Tri-Nation series, Sri Lankan fans did not say "let's get a bowling machine, replay those two balls and have it bowl perfect yorkers to negate any helicopter shots."

    When Wahab Riaz's throw was not collected cleanly by Umar Akmal on the last ball of the WI-Pak game that could have prevented a tie, Pakistani fans did not say "let's replace Umar with Kamran and replay that last ball". OK, wrong example, but you get the idea :-).

    When Siddle comprehensively beat Pietersen on the drive, and in Hill's judgment there was a nick, we shouldn't be clamoring for technology (hot spot, snicko etc.) to replace what Hill thought at that moment. Pietersen was beaten - it is inconclusive whether there was a faint nick or not. A millimeter here or there for Pietersen is as much a matter of luck as Hill believing one way or the other. It is part of the game.

    The needless interruptions and constant questioning of umpire's calls is creating unnecessary pressure on both the umpires as well as the players calling the reviews. It is also magnifying the honest mistakes and creating additional pressure on an already high pressure job. And most importantly, as Gilchrist has pointed out, completely destroying the flow of the game.

    If Eranga keeps bowling at the wrong spots, Sri Lankan selectors will drop him and replace him with a more reliable bowler. Similarly Pakistani selectors will drop Akmal and get a better keeper in there. If Aleem Dar keeps giving the Broads of the world not out, the ICC will score the decisions with all available technology and drop him from the elite panel.

    Until then, all we need is faith that Eranga/Akmal/Hill/Dar are human and trying their best, and will occasionally get things wrong.

    DRS should be used for post match accountability of umpire performance, not take the focus away from the 13 people on the field actually playing the game. The 1981 and 2005 Ashes were magnificent series and all people talk about after all these years are the heroics of Botham, Willis, Brearley, Pietersen, Flintoff, Vaughn, Warne...For all we know, Clarke and his team can come back and end up tying the score 2-2 but all the twitterati will talk about is the DRS. 

    That's a shame. End DRS during the games, it's not cricket. 

    Have a little faith.

    Friday, July 26, 2013

    An enchanting pair



    Do you know the story, of this enchanting pair?
    Regal and resolute, solid with flair.
    A defeat once stared, but the duo said nay -
    Valiantly they stood, battling an entire day.
    Inspired by the two, the team came out as one
    Dragons were slayed, and a victory was spun.

    a miracle!, they said
    never before, or in times ahead
    deeds like these, ever get done.

    Let's move forward, to two years and more,
    Adelaide's the venue, and an amazing encore.
    Xcuse me? Those two again?
    Mocking history, in a manner so vain?
    A team steps forward, one more battle is won
    New chapters are needed, the war has just begun.


    A sequel to "Reverse Swing"

    also published on Cricinfo
    Vishal Misra,  2003

    Update. Dravid and Laxman read the poem and autographed it!