20100225

One-Button Unread Mail for GMail Redux


It's been 16 months since the last version, and I've since gotten a chance to get a bit wiser (certainly older) with Javascript. So I decided to get around to updating my Greasemonkey script for a one-click "Show/Search Unread" button for GMail.

I believe/hope this version is much more fault-tolerant against GMail's frequent JS recompilations. It's also now rather language independent.

I've only used/tested it on the setup in front of me, so please let me know if it works on yours.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.3) Gecko/20090910 Ubuntu/9.04 (jaunty) Shiretoko/3.5.3

20100221

Yahoo OAUTH Not Supporting Authorization Header

Hopefully this will help another person running into this issue.

Like a lot of people, I was getting "Signature Invalid" when trying to initiate an OAUTH transaction with Yahoo, e.g., at https://api.login.yahoo.com/oauth/v2/get_request_token. For a while I thought the problem might be with the URL encoding of parameters, as mentioned in many of the discussion. However it turned out that Yahoo's OAUTH does not support the Authorization header, as mentioned here by "David". This is a serious limitation given that this method is the most preferred of the three specified in http://oauth.net/core/1.0a/ .

The solution for this is simple: avoid using the HTTP Authorization header, and pass the OAUTH parameters by URI instead.



I'm using the OAUTH PECL library. For this, just change:

$oauth = new OAuth($this->CONSUMER_KEY, $this->CONSUMER_SECRET);

to:

$oauth = new OAuth($this->CONSUMER_KEY, $this->CONSUMER_SECRET, OAUTH_SIG_METHOD_HMACSHA1, OAUTH_AUTH_TYPE_URI);

Mystery solved.

Update: Other ficklings with Yahoo OAUTH support:
  1. When creating a new app, make sure your "Application URL" ends with a file, or a "/". For example, this won't work: "http://www.example.com".
  2. If after creating an app, you make any change at all, like adding a short description or an icon, your users will see "Warning: This website has not been verified by Yahoo!. For your security, we recommend that you continue only if you trust this website" when they authenticate with your app.

20100209

Mark Twain & Benjamin Disraeli

First, go to http://google.com, type in "Mark Twain & Benjamin Disraeli", click "I'm Feeling Lucky". Do that now. Then come back here.

AdAge has an article out claiming that "the number of people who view their friends and peers as credible sources of information about a company dropped by almost half, from 45% to 25%," between 2008 and 2010. It goes on to surmise that social media is to blame, "social networks themselves may be contributing to the decline in trust." This is all based on quoting an Edelman (a PR firm) 2010 study.

This is all too facile an explanation, I thought. Sure, the definition of "friends" has loosened considerably thanks to the rise of Facebook. But the chart showing huge (20+ point declines) and across-the-board (TV News, Radio, Newspaper, as well as Friends) declines in trust just screamed "systematic change" to me. So I decided to dig by going to the source and compiled my own graphs from Edelman's data.

And here are the errors from source to article:

  1. Edelman distinguishes between "Friends/Peers" and "Social Networking Sites", with different numbers for each category. In fact, the numbers for SNS haven't changed at all from 2008 (20% +/- 5%) to 2010 (19% +/- 5%). In further fact, SNS is the only category not showing a decline from 2008 to 2010. For the article to make a direct link from the "Friends/Peers" numbers to Social Media is erroneous.

  2. It turns out Edelman's numbers on "Friends/Peers" show no 2008-2010 change of that magnitude (-20 points). They do show a 12-point decline for "Friends/Peers", but also 11-13 point declines in Newspaper, TV News, Radio News, and Business Magazines. I don't know where the 2010 numbers for AdAge's chart comes from, but speculatively the systematic offsets could be that they looked at, e.g., numbers from the subset Edelman calls "skeptic countries" (UK/France/Germany), or the subset responding "Extremely Credible" (as opposed to "Extremely Credible" or "Very Credible").
Also, consider the responses to Edelman's trust question for Financial Investments. For that, "Friends or Family" score 61%, second only to "Broker/Advisor", at 68%.

Finally, it is true there seems to be a systematic, exogenous change in trust levels across the board from 2008 to 2010. I consider these to be more likely explanations of this change:
  1. The 2008 study was completed in Jan 2008, before most people learned the name Madoff and felt personal pain from the economic contraction. It's not unreasonable to link these events to an across-the-board decline in trust. Or,

  2. A systematic offset due to sample error or methodology changes in the studies.
All the same, it's all too facile to blame social-networking for this decline. Edelman's numbers don't show that. At all. And hats off to my new Facebook friend, Shiv Singh, for surfacing this in my activity stream :)