Hacking BrowserPlus

Wow. It’s pretty cool to see so much excitement about BrowserPlus just a day after putting it into public view. Truly, its humbling. Already many folks seem eager to go beyond experiencing it and actually start tinkering, building - and some have. It requires a bit of tenacity to uncover but actually, everything you need to get started is at your fingertips. Let’s look at what it takes to start hacking.

First, there’s the core BrowserPlus javascript API. The latest copy is at http://bp.yahooapis.com/2.0.4/browserplus.js

In this file are all the functions outlined in the code samples along with a full under-the-hood look at what is going on in many of the calls. The two key functions you’d need to know are init() and require(). (See the linked samples for usage.) Putting this together we can create a simple local file, test.html:

<html><body></body>
<script class="javascript"
   src="http://bp.yahooapis.com/2.0.4/browserplus.js">
</script>
<script class="javascript">
  YAHOO.bp.init(function(res) {
    var greeting;
    if(res.success) {greeting = "BrowserPlus says, Hello World.";}
    else {greeting = "BrowserPlus is hiding.";}

    document.body.appendChild(document.createTextNode(greeting));
  });
</script>
</html>

This is a simple document that will attempt to initialize BrowserPlus. If it succeeds, it writes “Hello World” to the document body. If you run this sample in your BrowserPlus-enabled browser it will fail. Why? Currently, BrowserPlus is restricted to Yahoo! sites; that includes restrictions for running local files. A simple addition to our test file exposes the error:

  else {greeting = "BrowserPlus is hiding. ("+res.verboseError+")";}

The error BP_EC_UNAPPROVED_DOMAIN confirms the local domain (file://) isn’t permitted. That means it’s time to dig into the BP configuration files. On Mac these are in

  /Users/[you]/Library/Application Support/Yahoo!/BrowserPlus/

On Windows XP, you’ll find them in something akin to

  c:\\Documents And Settings\[you]\Local Settings\Application Data\Yahoo!\BrowserPlus\

and on Windows Vista…

  c:\Users\[you]\AppData\Local\Yahoo!\BrowserPlus\

In the Permissions folder is a file similarly named which is what we’re looking for. Opening it up we see:

    "whitelist" : [
	"^http(s?)://(.*)\\.yahoo\\.com$",
        "^http(s?)://(.*)\\.yahoo\\.com:[0-9]+$"
    ],

The intuitive addition to this list is:

    "whitelist" : [
	"^http(s?)://(.*)\\.yahoo\\.com$",
        "^http(s?)://(.*)\\.yahoo\\.com:[0-9]+$",
        "^file://$"
    ],

The file is modified, but BrowserPlus hasn’t picked up the changes yet. The clean way to force this is to close all open browser windows. (BrowserPlus shuts down when no pages are using it.) The dirty way to do this is to search for BrowserPlusCore in your process list and kill it using your favorite platform-available tool. Either way, after opening test.html back up we should see our “Hello World.” Sweet - now we’re ready to start playing.

There is one final catch. BrowserPlus is fairly proactive about security so it helps to know that the permissions file will be overwritten on a regular basis. The savvy way around this would be a simple build script or at least a handy copy of our modified permissions file that we can use to reapply the changes in between development sessions. We might also test for BP_EC_UNAPPROVED_DOMAIN somewhere in our init callback to scream if the temporary development environment is disrupted.

That’s a lot of under-the-hood detail, but the takeaway is that BrowserPlus was more-or-less designed to be hacked. Not hacked in the “I want to steal innocent users data and delete their files” sort of way, but in a manner that allows experimentation and freedom without compromising the security of pedestrian users. There’s more there to be mined, but enabling local development is a good place to start. Good luck and cheers to all the curious and creative souls.

Launches, finally.

After 3 years of hiding out in the campuses of Yahoo! it’s good to finally have something external to show for it. Most exciting is the release of BrowserPlus, a software and software distribution framework that allows device developers (desktop, mobile, etc.) to seamlessly bridge the browser programming environment (DHTML, JS) to any component they can dream up (VoIP, image manipulation, data caching, etc.). Some time ago we created a platform team to focus on device software at Yahoo! and this is what has emerged amidst the quickly shifting strategy of the mothership. The 1.0 release of BrowserPlus is intended only for use by Yahoo! sites to enhance customer experiences; however, in the coming months, developers might expect the ability to use components on their own sites. (If you’re interested in this, send us feedback). In the meantime, you can hack the framework on your own system after you’ve installed it to start experimenting. You can experience BrowserPlus currently through the PhotoDropper module on Mash, though direct installs are available for mac or pc. A hearty three cheers for the guys that made it happen - Lloyd, Gordon, Dave, and Steve.

Also this week was the official external launch of Fire Eagle, a platform for sharing your physical location in the world, to developers. This is the second public-facing project to launch from the team we started in San Francisco back in late May, Brickhouse. (The first was BravoNation.) Dopplr is one of the first sites to make use of Fire Eagle, updating your location to Fire Eagle once a trip begins or ends. You can expect wider exposure of Fire Eagle in the coming weeks as more developers ready their apps for the service, creating a complete ecosystem of location-sharing apps - from geo-friend-finders and SMS location updaters to location savvy search tools. Finally, location apps don’t have to be a closed system solutions. The whole team (Jeannie, Sam, Kevron, Rabble, Simon, Seth, Phil, Marc, Mor, and Salim) will be celebrating and evangelizing in SXSW this week, though a special congratulation is in order to Tom who carried the product from skunk works to research prototype, and delivered it at public launch this morning.

An interesting parallel between these projects, aside from their timing or my contributions, is that both employ Ruby in significant ways - significant, not necessarily to the scope of the app, but to the future of the language itself. Fire Eagle is the first Ruby on Rails application to be publicly launched at Yahoo! (a technical stunt on all fronts, indeed), and has the potential to be the most significant test of scale for the Rails platform on the Internet. BrowserPlus is making use of Ruby through an runtime engine component that allows for other components to be written in Ruby rather than compiled OS-native languages. That is, load the Ruby Engine component into BrowserPlus, then write your own component in Ruby that leverages any gem on the planet to offer up new functionality to your applications in the browser. It’s all super easy to do, but we are getting ahead of ourselves in suggesting you write your own at this point. Still, it’s all exciting for the world of Ruby.

Both BrowserPlus and Fire Eagle will be easier to get your hands on in the coming weeks, but if you want to play with one of them now it’s best to go through Mash for BrowserPlus and Dopplr for FireEagle - so you have a chance to see each platform working in practice. If you need an invite to any of the above, just post a comment to this article with your email address (no worries, it won’t be exposed).

Rediscovering Clinton

I’m popping open the RSS reader less as of late, but today I caught that Matt logged a post thanking Clinton on his unsolicited evangelism of Kiva. Reading through Clinton’s recent interview on MSNBC I can’t help but feel an astounding glow about what’s going on.

Over 12 years ago I worked for Clinton in the West Wing. I didn’t think much of him then - I’m not sure why (perhaps its always easy to dislike politicians) - I was mostly excited about working with this evolving thing called ‘the web’ in the context and influence of the executive office. Still, it was immensely humbling to be in his presence. Of the two times I met him, I couldn’t get much more out that quick pitch for supporting overseas educational exchange programs. He listened, responded earnestly. You had some sort of feeling that you were in the presence of a gentle giant.

I’d say with every year since the passing of the last election, my respect for him has grown (and for Gore too, for that matter). Watching these men retire from their DC personas and redirect their fame and fund raising capacity to speed the snowball of work for global social change and bolster the realized potential of the tiny organizations with bright ideas in this space - well, it’s simply magical. It embraces a hope that were not just experiencing a fad or being exploited by clever marketers - the culture that is emerging is one that will care for the world and see through to solving of the problems with which we’ve been challenged.

More specifically, it is utterly mind blowing that this man who is, for all practical purposes, unaccessible to most of the population yet has seen the world and its macro-problems more completely that I ever will, completely understands the Kiva model down to the finest detail and endorses it as scalable and capable of fatally impacting the enormous problem of re-dispersing the world’s wealth. He respects my dearest friends and our labors more than I’ve ever extended the same to him. It just makes me stop and thank God for letting me be a tiny part of something so beautiful.

prisons of pattern

Two weeks ago I stopped by a friend’s gallery opening entitled Conditions are Perfect. Admittedly, I made the detour in my Friday evening because of the intrigue aroused from love of the Conchords. However, the show was great and George’s collection on display was fantastic. Perhaps even more impressive was the explanation they put together on how this classic quip from Business Time related to the objective of their collective artworks. Supplementing this essay was a brief statement by Chason Matthams explaining his collection specifically. It resonated well with me in addition to larger theme itself, even though I found his edgy organic late-Guston-esque work less accessible.

your day to day, the pattern, can be a prison you must design for yourself in order to deal with not pursuing the triumph of real joy. not addressing what you truly want creates a terror so large that an entire existence of numbed out living is created in order to mask it. the prospect of joy so grand that the fear of not attaining it makes the work that must be done to do so seem daunting and impossible. instead we opt for the meaningless that we then put all value upon, seemingly easier work and living, moments of happiness increasingly fleeting. a system that branches out sucking away more than it will ever reward you, both of those directly associating with you and of yourself. the result is joyless.

– Chason Matthams

Though I hadn’t planned on it, I suppose this is a more fitting time than any to comment that I’m doing something new now. For the past 3 months or so I’ve been working as a part of the Brickhouse in San Francisco. After 5 years of working at Yahoo! it was time for a change, though I never expected to still be tethered (however loosely) to the mothership in Sunnyvale. Especially in light of this quote, the first few months have been fantastic. Every day is different and certainly I’m full of more joy than I have had in a long time. In my yesterday I can sympathize with ignoring a notion of routine to break from downtown by bike and celebrate with Kiva on their 100,000 user. The city itself has a healthy rumble of unpredictability that sustains our own disorder which itself is well-greased by a welcome rabble of Anarchists, rebels, and freethinkers comprising our majority; and, our organization by design is buzzing with a sea of ideas and projects - both formal and informal. The result is an environment that while not always sensible or comfortable, is truly a delight to be in. Though I’m sure this, and even more so - my life, is many journeys away from the artist’s ideal it is propitious change that it is hard not to wish I had made earlier.

it’s businesses time

Last Wednesday was one of the happiest days of my life. There were many good things about Wednesday, but the dominating glow came from seeing Kiva on the Front Page of Yahoo!. Ever since Daily Kos spiked traffic to wipe Kiva clean of inventory, I’ve been waiting to see the day when the impact of Kiva justified a place in the most visible real estate of the Internet, and when we were able to handle the load such attention would present.
Perhaps more importantly, years of anticipation were fulfilled in seeing two of the most influential spheres in my life run tangent at the most significant of points. I’ve been begging groups at Yahoo! to do something meaningful with the audience, cause, or even spirit of Kiva for well over year. Only in our wildest dreams did we think that Yahoo! would give Kiva real estate on the front page (and certainly not the feature story). As it turns out it is more rewarding to see that the eventual intersection had nothing to do with my interactions in Sunnyvale and everything to do with the work that is going on in the Mission and in the partner countries. There were no favors done, no presentations acted on, and no compromises made on either side. Kiva was presented before the largest of all populaces solely on account of you, the viewers and the lenders. You voted with your clicks and love won.

radio foreshadows the killing of the video star

I haven’t been writing much recently (perhaps because the number of would-be updates are overwhelming), but some things must be shouted about to whomever will hear them. (bonus points when the events border on the traditional definition of historic.)

Ian writes on Internet radio silence taking place today in protest of rate hikes for the broadcast of music. He does a fantastic job at explaining how this whole situation unfolded; if you plan to be following news on this, his write up will be a fair and balanced guide to navigating the “he said” - “she said” to transpire. Ian loves music (specifically the parts prime for recording and distribution) more than anyone I know personally. His life is devoted to it. The fact that he (now being the GM of Yahoo! Music) is accused as employing resistance to the new legislation as a front for securing “high profit margins” on radio is fantastic fodder for some early Tuesday morning laughter. I mean, to claim that any part of Yahoo! Music is turning fantastic profits is humorous enough, but to imagine Ian as a sleazy two-face money-hoarding executive is somewhat akin to painting Howard Zinn as secretly funding strongholds of racial discrimination and persecution to secure the quality of material needed for another bestseller.

Stepping back, this is all very tragically beautiful to me. Radio advertising is starting to implode. As Ian explains, the answer is

…painfully simple: we’re still in a crossroads where old businesses and policy makers simply don’t understand or believe the realities of a new and growing business.

The situation is exacerbated by the fact that audiences have already chosen a path forward, the advertisers were running too far behind to see which way the listeners went, and the rights owners are still dumbfounded that there’s even an intersection in the middle of their golden expressway. Napster was disruption. It was supposed to be the alarm clock for the earthquake. This, however, is the first crack in the crust. Royalty collectors can’t collect fast enough from new media so they are their tightening the hold on what they have and are strangling Lewis & Clark in the process. But don’t blame them or the audiences - it is the advertising industry’s fault.

I’ve never thought of it this way, but somewhere along the years (though certainly in the 80s) we made advertising such an unappealing and distasteful industry to the innovators and social revolutionaries that a disproportionate number of would-be entrepreneurs has ignored the profoundly profitable problems to solve caused by respective shifts in the technology of media consumption. We’ve been so creative in the numerous ways we’ve made it more stimulating and convenient to consume our movies and music that we (the innovators) forgot it is an ecosystem critically fueled by sponsored persuasive messaging. That’s not to say such sponsorship is therefore intrinsically symbiotic to content, but we were all quite naive in thinking we could decouple them now without an economic implosion (both of finance and of content). And so, without advertising infrastructure that is innovative enough to connect us (the audiences) with the advertisers in ways that are as deep and controlled as the relationships we have with our new media, business deteriorates eventually to give way to rapid crumbling.

It is for this reason that I’ve come to appreciate the thinkers who were too cool for search algorithms and spectrum analyzers, and instead began to dream up keyword auctions and real-time content-to-ad binding. Bravo to Overture, AdWords, and all of the small minorities doing creative thinking in the advertising space. “Bravo” in the most cliché of deliveries because though the efforts have been valiant, our infrastructure is still so primitive and broken that we might as well have put USAID in charge of it.

I’ve been saving the more pleasant imagery for last. The metaphors in my head birthed by the word “crossroads” got me to thinking - reminiscing even? - over what advertisements were like in the Wild West. What ever happened when the cities lost their populations to 40 acres and the 49ers? Certainly Fairway wasn’t ready to post billboards on wagon trails. Between saloon post pinups, traveling sideshows, and streetwise salesmen advertising must have been pretty durn entertainin’ (if my Hollywood stereotypes are to be believed), not to mention interactive and well-targeted. It would be interesting to know if there is a story there - and something to learn. Still, it helps me imagine a world where persuasive messaging is welcomed as helpful, efficient, and easily debunked when malicious or deceptive. Then, perhaps, I’ll let it wrap its fingers around my content again - or at least that for which I’m not keen on paying.

In the meantime, sit back, relax, and watch the music industry crumble. Go get popcorn, come back, and watch print and video follow naively in its footsteps as if a rehearsed comedy. Meanwhile if you want interactive Internet Radio to listen to through it all, don’t forget to write your representative.

special music

John Mark posts about a special music performance that is so far apart from most youths’ cultural context that they treat it as You Tube satire.

I grew up watching performances like this every Sunday morning and evening of my childhood. Now, it takes a good dose of reality and visions of Wal*Mart to believe that such inspirational sermons-in-a-song still get rehearsed (including hand motions for dramatic effect!) and performed.

Namasté, India.

Today I depart for India. In fact, I’m halfway there - halfway to halfway around the world - the farthest I’ve ever been from home, though I have a feeling it won’t feel quite as remote as Morrocco did, not at least this time around. It is a short trip and just looking through the travel books I know I want to stay longer than I can. I’m hoping this is a great preparation for spending weeks or months in such a vast and diverse land. I’m also looking forward to having perceptions changed from those that I have taken for granted during my limited but steady exposure to Indian culture and Indian natives through Silicon Valley and the tech industry.

I’m waiting in the lounge for Gate B20 in Frankfurt’s Airport. There are two power outlets here, and along with the man next to me, I’m lucky to have snagged one and tapped into a hotspot to get a quick Internet fix before the next 9+ hour flight. Even though the trip is long, I think the layover is actually a welcome interruption. It is not nearly as painful as the 13hour non-stop flight from the West coast to Austrailia’s East - or at least it doesn’t seem that way so far. Perhaps I should wait until I finish the trip before making a judgement.

This morning before my flight (or I suppose it was yesterday morning) I made three quick errands all over the neighborhood on the Veloce in under 30 minutes. It was fantastic. Here in Deustchland, reminants of the Weltmeister are still in the air.

‘69 Veloce

I have a new crush. Bella. Veloce. Stimolazione. This weekend I finally took home my 1969 Vespa 150 Sprint Veloce and began the process of getting her aquainted with the foggy SF air after 5 years of sitting garaged. It was a rough start to our relationship, but after a new ignition coil and fuel line she’s finally come around. I’ve been taking her out every afternoon or evening so far to work some of the crud built up in the engine from the early new-millenium hiatus.

She’s every bit a classic and 100% Italian even down to the scratches on the cowls and the fuel cap label reading “USARE MISCELA AL 2%.” The Sprint Veloce was the name applied to the 150cc Sprint models produced directly for the Italian Market though I’m still learning the distinctions to the 150 Sprint aside from the lack of ignition or seat locks and the speedometer in kilometers. In the pictures posed on flickr, you can see small dealer stickers on the front and rear of the bike which suggest that at some point the bike was sold in Modena, though aside from a brief history of her story in SF since being imported around 1998, I can’t say that I know much more. That said, she’s a joy to ride and a dream to park. In addition to my new Breezer and the Yahoo! shuttles to Sunnyvale, its one more reason to leave the car in the garage, and 150 more reasons to go out smiling.

stick together

This week, Ambata launched their site aiming to connect communities of consumers here with global communties of producers. In one sense, it is an online store for the globally conscious consumer. However, the ideas behind it run deeper. Nathan and Tony are looking to create a social network of individuals interested in fair trade, sustainable, and enviornmentally responsible products which promote and sell these products through personal relationships and local communities. In fact, they care very little if products are bought through their site, and in fact have programs to sell products through other web front doors or even local community retailers, including church or school forums. They have no plans for marketing other than word of mouth and person-to-person networking, not only because they believe it to be very effective, but because it is also at the heart of how they want to live and commerce. It plays in concert with the tune of how intential communities are reshaping our world.

Ambata has a lot of similarities to Kiva, not the least of which are their names. Kiva is Swahili for unity, while ambata is a part of the same language meaning stick together. Sounds synonymic enough. Both organizations target helping people in developing nations, and to do so, both aim at connecting people in the US with people at the poverty level through their finances. But just as the words are more complimentary or co-dependent than similar, so are both institutions, and that’s the beauty of what is happening. Kiva finances new business growth which leads to new products to be sold, and Ambata stimulates that growth by giving those businesses new or healthy outlets to sell their products - thus creating revenue by which to repay the loan and thus allowing new opportunities. Though I haven’t seen many situations like this, new loan requests could pop up simply because global export channels like those promoted by Amabata are created.

One thing I’ve often noticed about Kiva is that it currently has no significant domestic impact on poverty; that’s not a bad thing, it is just the nature of the organizational model. Mostly, it would seem that Ambata is similar in this nature, but due to the need to actually warehouse and distribute hard goods that means there is work for Ambata to hire out locally. For this, they’ve chosen utilize CityTeam of San Jose to manage their warehouse operations - a huge win for a fantastic program that works to rebuild the lives of homeless throughout the country and has had an amazing impact here on San Francisco.

So since Ambata is all about the word of mouth, take this post as a prompt to both educate you and for you to share it with all of your friends. Congrats to Tony, Nathan, Chelsea and all on the launch. We look forward to seeing the catalogs fill up with tons of new choices over the coming year!