Archive for June, 2006

Clickback Ad System (Rough Functional Sketch)

This past weekend I threw together an update to Kate and Annie’s Clickback project from the January Organic Marketing build-a-thon. I wrote it in ruby/rails, using acts_as_authenticated and acts_as_attachment, plus a couple of newer features like RJS, as well as Geoffrey Grossenbach’s sparklines package.

Like Kate and Annie’s original, the system provides a mechanism by which viewers can offer feedback on advertisements via a simple +/- voting system. Each vote then affects the likelihood of that ad subsequently displaying for that publisher. This feedback option is a simple but fundamentally different idea, and it makes sense from the media consumer, publisher and advertiser perspectives. Advertisers get feedback from consumers, and through the feedback their ads naturally tend to display on pages where they are most positively received. The plus/minus scores act as a fitness measure for each ad within a particular publisher space. Site owners and publishers ensure that only the most relevant ads appear on their site, not via some hip premier system, but collectively by the community members themselves. Finally, individual consumers and viewers see the ads that are likely the most relevant to their own interests, and they have a chance to participate in the ad selection process.

Clickback Thumb

Inspired by Google’s AdSense, I designed the inclusion code for publishers to be extremely simple. Including an ad is as easy as signing up and then inserting a short snippet javascript customized to use the publisher’s id. The viewers do the rest.

<script type="text/javascript">
clickback_ad_publisher = "brent";
clickback_ad_width = 728;
clickback_ad_height = 90;
clickback_ad_channel ="";
clickback_frame_border = 1;
</script>
<script type="text/javascript"
  src="http://panoramic.media.mit.edu:3000/show_ads.js" >
</script>

Pascal’s Triangle in Ruby

My solution to the Pascal’s Triangle quiz this week:

#!/usr/bin/env ruby

def center_str s, len
  n = (len - s.length) / 2.0
  ' '*(n.floor) + s + ' '*(n.ceil)
end

n = ARGV[0].to_i
rows = [[1]]
for i in 1..(n-1)
  k = -1; r = rows[i-1] + [0]
  rows << r.map{ |x| j = k; k+=1; x + r[j] }
end
m = rows.last[n/2].to_s.length * 2
n = n * m
rows.each do |r|
  puts center_str(r.collect{|x| center_str(x.to_s, m)}.join, n)
end

Sample output:

                             1
                          1     1
                       1     2     1
                    1     3     3     1
                 1     4     6     4     1
              1     5     10    10    5     1
           1     6     15    20    15    6     1
        1     7     21    35    35    21    7     1
     1     8     28    56    70    56    28    8     1
  1     9     36    84   126   126    84    36    9     1

Promise v0.1 Demo

Promise screencast

I recorded a brief (4 minute) screencast of the promise service in action as of today. This is a sketch of a public contract/promise system in which participants can create custom contracts, assume roles within those contracts, sign them, and comment on them. The idea here is that each user then establishes a set of contracts, and implicity a set of contractual relations. Since the contract expresses a relationship between a set of individuals, and information about the contract, such as dates or tags or comments, are then also applicable to the participants in the contract. It is a potentially rich, dense network. It breaks beyond social networks like myspace or facebook or friendster, because these relationships are flexibly and arbitrary, and there are expectations and requirements, more like real life.

While there are no breakthrough technologies here, I think the idea of social promises, agreements and contracts is new and worth exploring. Somehow the promise being out there, public on the web makes it more real than even a simple paper copy. There is an interesting feeling when I actually sign the thing and put it into effect. My role within the promise goes from being undoable to… fixed. Sort of scary, but powerful too. It reminds me of the first time I bought something online, when the idea was so weird and new but the actual act was fairly straighforward. There is something to this, some kernel that is worth pursuing. It’s a simple action and simple technology, but with potentially complex social ramifications.

From here there are a few easy-ish add-ons that could enhance this system and make it seem more relevant. A web service API, with URI-based identification (like open-id), would allow sites to automatically set up their community members in contracts. Also syndication and RSS/Atom feeds would make it easy to monitor contracts and promises as they happen, including creation of new ones, addition of comments, signatures and breaches. Feeds could also be used to monitor users’ participation in promises. The more public we can make this data, the more weight the binding of the participants to their roles.

One challenging problem is to find the language to express these human relationships, which are complicated enough individually, and extremely intricate collectively. As I’ve often thought before, and as John actually brought up today, law is the ultimate programming language. It is the language for expressing human systems, social, political and economic. Capturing the elements of legal language in this contract system is hard. I’ve ranged in my approaches from full programming languages like Ruby (similar in spirit to Sussman and Hanson’s scheme law system) to something like what I have in this demo, which is natural language with a few placeholder variables. Burak had a few nice suggestions for wiki-like group editable contracts, and John had some intriguing thoughts about tapping a little more into some simple language processing, a la Zork. (similar to Hunt the Wumpus, which I fondly recall from my cs106 days). The vision of interactively, socially constructing these agreements is a good one. Looking forward I’ll see what I can do by revisiting the text interface, with an expressive but compact vocabulary and instantaneous, visual feedback.

Pelican & Mono at the Middle East

Just now returned from a Pelican/Mono show I attended with Jeevan Kalanithi, David Bouchard, Dave Merrill and my sister Erin at the Middle East. From the tall cans of PBR to the sludgy, stoney opener, it was a very rocking evening. Mono was absolutely epic, soaring and crushing. I’d never seen them, but had heard good things from Jennifer Lillie, Anita’s sister, knowledgable of things Japanese. And Pelican, the headliner that we weren’t actually there to see, vastly exceeded our non-existent expectations with a heavy, droney but tight set.

Outside between bands Jeevan and Dave and I also got to talking about what to do after the lab, and I think we all agreed it was a difficult topic. Before the Mono set Dave playfully mentioned the idea of a tech company in a warehouse space in SOMA in San Francisco, and it was such a poetic, perfect sort of vision, one that I’ve thought about many times myself but never really vocalized. Jeevan and I have joked about starting a company, but it dawned on me then that it really is a possibility, that companies and ideas really do form like this. I thought about it all through that Mono set. It was a nice daydream, and it was an appropriate soundtrack.

Coming home I found my sister looking for a new apartment in the bay area on craigslist. She was checking the prices of places in San Francisco. Looking over her shoulder I was surprised how expensive it all is there. I didn’t remember it being so pricey, and it was a harsh buzzkill on the daydream. How did that happen? So maybe I’ll have to revise the dream a little.

Identity in the URI Era

Web designers and dot-coms have been using domain names as their identities for years, and we’ve seen them become increasingly important. Domains and websites are a vital part of corporate branding and definition.

Yet fundamentally we are witnessing a rapid increase in the importance of these online identities, not at the domain level of marketing and branding, but in individual URIs marking specific online resources. Many of the key technologies of the new web economy rely on these specific URIs, from RSS and blog permalinks to web services and REST. Emerging technologies depend on URIs even more, such as RDF and the semantic web with subjects, objects and predicates all identified by their associated URIs. The OPEN-ID project is laying the groundwork for a URI-based authentication scheme that promises to be an “actually decentralized and doesn’t entirely crumble if one company turns evil or goes out of business.”

Dave Weinberger claims 2006 is the year of the unique ID. He’s right, but it isn’t just 2006. In the next decade as more people, things, places, companies and services come online, each of them is going to need an ID, and I predict that ID will be a URI.

Matching publishers with advertisers

A potential twist on google’s existing adsense scheme is to instead use an automated matching system, such that web publishers choose their preferred advertisers and brands, and advertisers choose their preferred web publishers. A centralized clearinghouse, possibly auction-based, then determines which advertisers match up to which publishers. The clearinghouse stuff has been pioneered extensively by economist Al Roth up at Harvard. Roth has designed a number of the matching systems used today, most famously the matching program for medical residencies, which optimizes both resident and hospital preferences. If we follow the long tail model, we predict that our economy will further decentralize, with ever greater numbers of people seeking specialized skills or products from other people. Surely large scale matching systems will play a role in linking specific needs with specific abilities.

If web publishers only list ads that they prefer, it increases the credibility of the advertisers and targets the ads better to the community. This is perhaps the next step beyond what The Deck is doing with preferred advertising. As someone in my group mentioned, The Deck perhaps marks the new era of media conglomerates. Rather than an exclusive “premiere” network, a market approach potentiates new forms of distributed, p2p marketing. It’s marketing (and profiting) for the rest of us.

Flight Ends, Summer Begins

A short 5 hour red-eye (or “shut-eye” according to JetBlue) from Oakland to Boston, and suddenly I’m back here at the lab, tired and spacey, definitely worse for wear. Annie is now really gone, her desk all cleared out. Kelly’s is almost cleared as well, and Burak is gradually removing his things and setting up a a workspace at home. This school year is coming to a close. The new students arrive next week, which gives Amber and me only a little bit of time to rearrange the office like we’ve been discussing with John. We also have a Simplicity lab workshop tomorrow afternoon at the faculty club, and I should be preparing my short presentation for that right now.

It’s always surreal taking a red-eye, not really sleeping enough to delineate the experience of being where you were yesterday from being where you are today, and not being awake enough to be able to logically separate the two. Yesterday I was barefoot on the sun-heated street admiring Jenn’s new surfboard, a used but quite lovely Santa Cruz 6′6″ epoxy that she aquired in trade for her previous cruddy board. Then this morning I found myself groggy and sullen on a red line train packed with Boston commuters reading the free Metro paper. I expected to jump right back into things, but I should be more realistic and give myself a buffer day.