Feb 19 2009

Find Unread Emails in GMail

I don’t consider myself a power Gmail user, in the contrary I know a lot of folks that manage their email inbox with a ton of labels and special filters. What I am is curious and of the school of thought that you should address all your email messages as soon as possible. I like a clean inbox with no unread messages because unread message just scream ‘deal with me’.

In Gmail, I was looking for a way to show all of my unread emails in one view. I have a modest inbox with 3000+ emails. Out of those 3000+ emails I have 4 unread messages. I simply don’t have the time or desire to navigate through pages of emails to track those few unread messages and deal with them accordingly. I looked all around for an option that would allow me to view all unread email in one view but to no avail. I looked in the More Actions and the different default folders such as Inbox, Starred, etc.

I eventually found how to see all unread email message after noticing that when you click on the Trash folder the search box will display the search query in:trash. It dawned on me that I might be able to read all unread email messages in one page view if I enter in:unread in the search box instead. As you may imagine, in:read also works and give a listing similar to what you get when you log into GMail.


Feb 18 2009

Facebook Fail Terms of Service

Mark Zukerborg wants to assimilate your data into the Facebook collective. Facebook claims to have over 175 million active users who have posted over 10 billion pictures and innumerable number of status updates. Facebook’s Term of Service gives them the right to do whatever they want with whomever they want with any and all of that data, including personal and private data. The Facebook Terms of Service reads…

You hereby grant Facebook an irrevocable, perpetual, non-exclusive, transferable, fully paid, worldwide license (with the right to sublicense) to (a) use, copy, publish, stream, store, retain, publicly perform or display, transmit, scan, reformat, modify, edit, frame, translate, excerpt, adapt, create derivative works and distribute (through multiple tiers), any User Content … and (b) to use your name, likeness and image for any purpose, including commercial or advertising

Facebook recently updated their overly possessive Terms of Service to include the following clause…

The following sections will survive any termination of your use of the Facebook Service: Prohibited Conduct, User Content, Your Privacy Practices, Gift Credits, Ownership; Proprietary Rights, Licenses, Submissions, User Disputes; Complaints, Indemnity, General Disclaimers, Limitation on Liability, Termination and Changes to the Facebook Service, Arbitration, Governing Law; Venue and Jurisdiction and Other.

If I was to rephrase the above legalese to colloquial English, the above corporate chatter would translate to…

All your data are belong to us, for ever and ever, byatch.

The recent update to the Facebook Terms of Service basically claims all user content for ever even if you delete your profile. They can also sublicense your content and derivatives of your works with any body they want without your explicit permission. This change to the Facebook Terms of Service has caused a huge uproar and massive protest within Facebook community.

The often shy Zukerborg responded to the criticism with post on the Facebook blog. Zukerborg tries to make the case that without a possessive and all inclusive license they can’t share your data to those you want to share it with, he says…

When a person shares something like a message with a friend, two copies of that information are created—one in the person’s sent messages box and the other in their friend’s inbox. Even if the person deactivates their account, their friend still has a copy of that message. We think this is the right way for Facebook to work, and it is consistent with how other services like email work. One of the reasons we updated our terms was to make this more clear.

I won’t get into the flaws of the technical details of his statement, how he states that their are two copies for every message, other than to say that he is obviously dumbing down his explanation ill conceived analogies. The key to his argument for such excessive terms is the comparison that sending a message on Facebook to a friend is like sending an email and that this is why Facebook requires special license and copyrights to your message. But this metaphor breaks down immediately, Outlook does not require a special license to deliver an email, nor does the United States Postal Service require any additional rights and privileges to deliver a piece of mail. I mean, not even hospitals claim this much ownership over patient information.

The only aspect of their new policy that seems to work correctly with their email analogy is that once you send an message their is no way to delete it and remove it from the recipients inbox. So in fact Facebook is imposing the worst aspect of a distributed system. In a age of wiki and social media, it seems backwards that Facebook does not allow user within their walled garden to modify, update, edit, and delete user content.

Perhaps the recent update to the Facebook Terms of Service is just a sign that lawyers make more of the technical decisions their than engineers. The legalese stands in the way of what end users actual want. In fact, you don’t really need this strong explicit legalese. When an end user sends a message to a friend, it is implied that the underlying system has the right to deliver it. The truth is that strong arming end users to new Terms of Service with what is outright excessive rights is bad a huge misstep in the management of Facebook. It clearly does not have end user’s data in mind.

In fact, even Zukerborg admits that the Terms of Service are overly excessive

A lot of the language in our terms is overly formal and protective of the rights we need to provide this service to you

I wouldn’t trust them with my pictures, because their Terms of Service allows them to do whatever they want with them, whether I approve of the usage or not. Zukerborg stated that they would share the data in way the end users wouldn’t want it to be used, but the fact is that they don’t have to ask user for any sort of permission and Facebook corporate can in fact do as they wish your the precious pictures of your kids, or the naughty pictures you marked as private.

In our digital world, data can identify us as much our fingerprints. Even anonymous search data has been used to track down individuals. Personal information is own by the individual, this is certainly true such as your hospital patient records, so why would private company would claim such excessive ownership of your data?

This is just another huge misstep by the Facebook management, and follows other Facebook Failures such as the UConnect litigation and Beacon fiasco.

UPDATE: Facebook has reverted their Terms of Service to an earlier version. This is a small victory for the Facebook community, but Facebook still claims excessive rights to do what they want with end user data while on the service.


Feb 11 2009

Twitter Business Model

Twitter is a popular micro-blogging platform and messaging service that has been gaining tremendous growth and user traction. There are already a growing number of politicians and celebrities using twitter.

It is no longer news, how Twitter is fast becoming a news source. We have learned about earthquakes minutes before Associated Press ‘broke’ the news. I first heard of the US Airways flight 1549 landing on the Hudson River in New York through Twitter. And we have witness Yahoo! layoffs through Twitter. It is undeniable that Twitter has become an important communication medium, so much so that I believe that Twitter is a new utility, such as electricity and water. As a communication vehicle, even with a 140 character limit, Twitter has been very versatile. You see more and more people sharing anything and everything, from links (using Tinyurl), pictures (using TwitPic), music (using blip.fm), and much more.

The most popular parlor game amongst technologist is to conjure up business models around the service.

The back seat driver, armchair quarterback, and meetoo MBA, will undoubtedly suggest an advertising-based revenue model. A common scenario is that for every 50 tweets, a small ad will be injected in your time line. This approach seems least intrusive. In fact, this simple business plan is used by The Icon Factory. The Icon Factory is the publisher of the free iPhone Twitter client Twitterrific. Twitterrific sells ad space right along your time line via their free iPhone Twitter client. Twitterrific is also available ad free for the Mac OS X for $15 and the iPhone and iPod Touch for $10.

Another avenue for revenue is to go a freemium route. The freemium model has worked well for services like Flickr. Flickr allows users to upgrade to a professional account with unlimited uploads and storage, ad-free browsing and sharing, and other benefits. Flickr’s pro account are available for $25 per year. Twitter can provide a set of key services to cater to corporate entities and marketers in pro account such as enhanced search and administrative tools. For example, some power users might be willing to pay a flat fee to have their friends limit increased by an additional 500 users. Dell, JetBlue, Whole Foods, Overstock, Zappos, and a great amount of pundits and cyber personalities are promoting their personal brands on Twitter and would be willing to upgrade to a professional account for added reliability, more friends, an additional features.

The open API has been a large part of success of Twitter. The simplicity and availability of the API has provided a fertile and organic environment for the growth of third party applications such as TweetDeck, Twitterrific, Twitpic, MrTweet, and many more. Ironically, as Twitter popularity has grown, a number of limitations and restraint have been placed on the API. For example, there are limits in the number of times a given Twitter user can request data from Twitter per hour. Again, some power users are willing to pay a fee to increase this limitations to better suit their needs.

In addition of a public API, Twitter has made available all the public Tweets, firehose access, in their systems to a small number of third party applications. A great many more third party vendors want access to the proverbial firehose than currently have access. The process to obtain firehose access is opaque and the willy-nilly discretion of Twitter management. The firehose access to public tweets should be available, for a fee, to any third party vendor.

Their is also a great monitization opportunity in providing private entreprisy groupware solutions. For example, Yammer is a version of Twitter aim specifically for companies and organizations.

As a platform for third party applications, and communication utility, Twitter is posed to be a long lasting company, if only they could just scale the service to their growth.


Feb 2 2009

The Rubyist: January Edition

Here is a recap of the top Ruby-related links for the month of January 2009. Links for The Rubyist are provided by A Rubyist Railstastic Adventure, a tumblelog.

Ruby

Ruby on Rails

JRuby


Jan 17 2009

The Rails Mythbuster

Everybody has an opinion on the most opinionated web application framework, Ruby on Rails. Some developers have spread a campaign of misinformation and FUD but this has not stopped the momentum or monumental growth in Rails adoption. But after five years of active development and pissing off committee full of astronaut architects DHH busts some common Ruby on Rails myths…


Jan 14 2009

ActiveRecord: Ruby on Rails Optional

Ruby on Rail is made up of a variety of code modules packaged as Ruby Gems. For example, Rails is composed of gems such as ActionController, ActionView, ActionRecord, and few other gems. It might sound surprising at first, but you can use ActiveRecord without the other Rails components. ActiveRecord is an Object Relational Mapper (ORM), it binds database records to Ruby classes that act as models to your data. ActiveRecord models allow you to post and query data to and from a relational database.

To use ActiveRecord, you will need to have it installed in your system. If you already have Rails, ActiveRecord is already part of your Ruby gems environment. If not, you can install it via the following command.

sudo gem install activerecord

Once the ActiveRecord gem is installed in your system, you can require it in your Ruby scripts.

require 'rubygems'
require 'active_record'

In a Ruby on Rails project, the only configuration not defaulted through convention is the information required to setup your database connection. In Rails, you usually have a config/database.yml file to point to the right database used in your web application. This information is passed to ActiveRecord to establish a database connection. In a Ruby script, a non-Rails project, you can manually create a database connection with the following snippet.

ActiveRecord::Base.establish_connection(
  :adapter => 'mysql',
  :database => DB_NAME,
  :username => DB_USERNAME,
  :password => DB_PASSWORD,
  :host => LOCALHOST,
  :port => DB_PORT
)

Obviously, you would need to replace the placeholders for the correct database name, username, and password to connect to your database.

There are times when you might need to enable the logger. You might get an undefined method or nil object error if you don’t set a value to the ActiveRecord logger. You can configure ActiveRecord to log to the standard error or standard output. To accomplish this, first require the logger gem then initialize and set the ActiveRecord logger.

ActiveRecord::Base.logger = Logger.new(STDERR)

That is essentially all that is required. Once you have a database connection, you can create models as you would in a Rails project.

class Post < ActiveRecord::Base
end

p = Post.new(:title => title, :body => body)
p.save

If you require ActiveRecord in your Ruby script, you can also use it to create database schema migrations. Once you have established an connection to the database you can run a schema migration such as the following.

create_table "users", :force => true do |t|
  t.integer "twitter_id", :default => 0, :null => false
  t.string "user_name", :limit => 20, :default => "", :null => false
  t.string "screen_name", :limit => 30, :default => "", :null => false
  t.string "location", :limit => 50, :default => "", :null => false
  t.string "url", :limit => 50, :default => "", :null => false
end

There are a few other ORMs written in Ruby, such as DataMapper and Sequel. One key factor of using ActiveRecord is that if you had dabbled with Rails before you already have it in your system, you don’t have to learn anything new, and you can be productive with it rather quickly.