A few months ago Ben Birt and Nick Johnson gave us some useful insights about the development of the AdSense Management API. This week, Gregory Block shares his experience of development against the API. Greg started the Google Publisher Toolbar project and is now the Team Leader of the development behind it.

Hello Greg, thanks for agreeing to be interviewed! Can you briefly describe your project and why you started the development?

The project started as a thought experiment - what would AdSense look like if we didn’t have a web interface for people to log in to, and we could only give you information within the context of your own site? It was originally called “AdSense Minus AdSense”, in homage to Garfield Minus Garfield.

Now, it’s a central part of our publisher strategy moving forward. Our customers use our products in concert with one another, but we send them to each product to figure out what’s going on.

Think of it as an “in-context” review tool for everything you do with your site. Ultimately, it will incorporate all of our platforms - AdSense, the DoubleClick Ad Exchange, DoubleClick for Publishers, Analytics, Webmaster Tools... we want you to know about all the information available within the context of the page you’re looking at.

People look at the websites they build and manage hundreds or thousands (and for some, more) of times each working day; they use our frontends only sporadically. We push information down into the place they need it most, at the right moment, in the right context.

You have more than 18 thousand users and an average rating of 4 stars: are you happy with your project?

It’s been hugely successful internally at convincing people to look beyond product silos and really focus on the needs of our end users. Ultimately, I’m aiming to provide a better, more accessible, more immediate, and more integrated experience than they can get from our web products. We’re going to support the whole publisher ecosystem, and I’m excited about all of the things we can do in that space.

It’s also a great showcase for our APIs - most of what the chrome extension does is accessible by any user from our public APIs.

What about the development process? Do you have any suggestions for other developers?

The process begins and ends with the end user. Efforts like the Google Publisher Toolbar drove our API strategy because we had a clear need we were trying to meet. Know your user, and have a clear vision for the product and how it helps that user do what they need to do.

Behind every good app is a good idea; but a good idea isn’t good enough - execution matters. The other important thing, in my opinion, is the toolchain. We take a strict approach towards building verifiably correct JavaScript, enforce strong type safety, and we bake in unit testing at development time. The toolbar isn’t one binary - it’s lots of binaries, all interacting with each other through messaging and callbacks, and we wouldn’t be able to get here without the help and support of our tools infrastructure.

If you had to mention one thing about developing against the AdSense API that positively impressed you during the development, what would that be?

Speed, speed, speed. A thin skin on the API is an order of magnitude faster than anything you can get out of our frontends. I think the API is well within reach of most of our publishers, and we can learn a lot from what people build from it. Some of those ideas we’ll be able to feed back in.

First and foremost, use the client libraries. There’s a vast amount of stuff taken care of automatically, and you’ll write and maintain less code.

Second, get your OAuth2 flow in place early. You’re going to spend a lot of time using it, and so it’s best to get that done right away. You’ll be tempted to just hack in a key you generated by hand into the source, but user experience matters. (I’m speaking from my own failures here.)

Third, think about security. We take a very, very cautious approach about inserting content into the page, and deciding what information is allowed to live in the DOM. We could improve the user experience by loosening that restriction, but we’re looking to bulletproof the product against social engineering and information leakage. As new features propagate down through the chrome versions, we’ll be using more and more of those secure mechanisms to deliver content in-site - the Chrome Infobars API, for example, will allow us to replace our in-page notification bar with one that is less intrusive to the user and doesn’t interact with page content. Sandboxed iframes will allow us to further restrict the security container of the in-page content, and allow us to move content that previously lived in stand-alone windows into in-page overlays and provide a richer experience to publishers. We use chrome as our sole platform because it’s secure - and when it comes to surfacing sensitive information like publisher revenue, security matters.

Last, prototype early, prototype often. There’s a whole skunkworks Android application we launched solely to experiment with and theorize on. Moreover, and in many ways more importantly, I depend on a UX person to cycle through a lot of ideas with me before roughing them out in code; we then cycle back through and iterate once we’re looking at implementations until we’re happy. On more than one occasion, I’ve cut a corner and not fully implemented something that was different in the mocks, and I’ve regretted it every. single. time. Don’t underestimate the power of good design.

And if you had the magic powers to request one additional feature and have it released immediately, what would that feature be?

In the immortal words of River Song, “Spoilers”.

What else do you do at Google?

I’m also responsible for the DoubleClick Ad Exchange Seller frontend here in London, as well as running a team called Publisher Insights that recommends revenue-impacting changes to the sites of AdSense and Ad Exchange publishers through simulated A/B experimentation.

Let’s talk hobbies and personal interests. What interests do you have outside work?

I play an awful lot of video games. I play through most games exactly once, to keep the size of the Pile of Shame (the games I bought but haven’t played yet) low. I’m currently on Act 3 of Diablo 3, and having mixed emotions about the experience.

I also have a Basset Hound named Daisy, who takes up an inordinate but pleasurable amount of my time.

Soooo.....what about Mass Effect3?

Utterly devastated. Taking reasonably ‘hard sci-fi’ and giving it a magical ending is a cardinal sin; I literally wish I could un-play all three. No amount of tender, love and care is going to help me forget.

There. I’ve said it. I feel better already.

Thanks Greg! Keep up the good work!