Jun 29

Google Microsoft and Yahoo!; Dare can’t see straight

Google, Tech with tags: 3 Comments »

Musical Chairs

Dare is back to blogging, which I like to see. His latest piece though is about a so-called exodus of Googlers going to Microsoft.

NOTE: An exodus is:

a departure or emigration, usually of a large number of people

He notes a couple of blogs talking about a move, including Danny Thorpe and Sergey Solyanik. I am sure there are more, but an exodus is a bit rough. However, I could quite as easily discuss the number of Microsoft, Yahoo!, Apple (insert other companies) folks that I get to work with at Google. The problem is that this is meaningless. We are looking at the micro-level, through our lens working in our areas at our companies.

I am sure that in the coming week, there we will be some musical chairs at companies as large as ours. That is the way the world turns. Many people move on, they try new things, they want to work on something else etc. Especially in this day and age.

How about we get back to technology again, and look at the great work that all of these companies are doing. All the industry wants to talk about with respect to Yahoo! is some executives leaving. However, I have met with a lot of Yahoo! engineers in the last few weeks and they are working on exciting projects. Yahoo! has a LOT of users. They are a great company, born of the Web, and they never seem to get the credit their deserve. How many websites have you created with that many users? Phenomenal.

Dare, your company is doing great things too. I would be much more excited to hear more about that side of things, than employee counting. I would be much more excited to see our companies work together to progress the Web, as well as competing in various industries.

Enough SOAP opera, let’s give it a REST (sorry….). I normally don’t get into these kind of topics, but the general talk has been grating me recently, and I want to hear something fresh and new.

I have been playing with some Web technology and have been astonished at how far it has come in many ways. There is still a long way to go, and much we can all improve, but I am pretty jazzed about the technology whilst at the same time frustrated with the non-tech talk.

Maybe it is a time to get a bunch of engineers together and talk tech… maybe in Hawaii? Anyone in? :)

Jun 22

Endpoint Resolver: Getting tinyurl out of the Twitter stream

JavaScript, Tech, Web Services with tags: , , 11 Comments »

Sometimes you can get in the zone just enough to be productive on a plane. On my flight to Mexico City yesterday, I created Endpoint a project that contains a server proxy, JavaScript client, and Greasemonkey Script with a mission. The mission is to take a URL, work out if it is a redirect (via a Location: header), and then return the final endpoint for it.

Why did I do this?

I was brainstorming functionality for a Twitter client with James Strachan (he is working on gtwit) and we talked about how annoying tinyurl / is.gd / snurl / you name it URLs are. They don’t tell you where you are going, and you could get Rick Rolled (if you are lucky) or much much worse.

So, I wanted to create a library, and one client (Greasemonkey) to test it out. Then anyone else could use it too to resolve directly from their Web pages.

How does it work

You load up the JavaScript via script src and then you can call resolve, passing the URL and a callback that will get the result. A few examples:

// Simple version
Endpoint.resolve('http://snurl.com/2luj3', function(url) { 
// Using the original URL to work out if it has changed
  function(url, orig) { 
    alert(Endpoint.isRedirecting(url, orig));
// How it is used in the Twitter Endpoint Resolver
Endpoint.resolve(url, function(resulturl, originalurl) {
  if (!Endpoint.isRedirecting(resulturl, originalurl)) return;
  newtext = newtext.replace(originalurl, resulturl, "g");

Under the hood, a bunch of stuff is happening. I would love to be able to just use XMLHttpRequest to dynamically hit the URL and look at the headers, but the same-origin policy stops me.

This is why I have the server proxy, which returns a JSONP callback.

When you call resolve(url, callback) the script tag is created on the fly and added to the DOM. The callback function is all handled to allow multiple calls, and then the chain unravels.

Here you can see it all in action, showing how my Twitter stream will go through and the URLs will dynamically change from their tinyurl versions to whereyouaregoing.com:

I wanted to use App Engine to host the server proxy, but unfortunately I can’t work out how to do that yet. You have access to the URLFetch API to access resources from App Engine. Unfortunately for me, one of the features is that it understands redirects and just goes on through to the full resource itself, with no way to get the endpoint from the headers in the response.

It was also interesting to read Steve Gilmor talk about these services all be it in a post that is hard to actually understand ;)

Also, Simon Willison just put up a simple service on App Engine, json-time, that “exposes Python’s pytz timezone library over JSON.” I think that we will see a lot of these types of mini-Web services hosted on App Engine. Taking Python utility and making services from its goodness is an obvious choice.

Jun 19

Movement in the death of old browsers and IE 6

Tech, Web Browsing 8 Comments »

I talked about having a best viewed in [insert new browser here] day where prominent web sites (and anyone who cares too) display some kind of sign, maybe on the first Monday of the month, that says:

If you like this application now, you will love how it runs if you were using a modern browser

This happens if a non-Grade A browser is detected. We can even go further and push a new version of the browser the person is using. For example, if someone comes in with IE 6, we prominently show IE 7, and then also offer Firefox 3, Opera 9.5, Safari 3.1 for Windows.

As Web developers we have put in so much time just to make sure that IE 6 runs our application well. This is like writing desktop software that runs well on an 8 year old machine!

It hasn’t mattered all that much until the last year or so, as now we are developing richer and richer Web applications.

As I look at apps like Gmail, Mobile Me, 280 Slides, Yahoo! Mail, etc etc…. I say screw it. People upgrade their computers when they want to run things faster, why can’t we ask them to upgrade their browsers.

If you have a simple content site, then it is fine to support everyone, but as you build rich apps, maybe it is time NOT to be a crutch and support these browsers.

It is interesting to note that Mobile Me doesn’t support IE 6. People have shouted at the SproutCore chaps, but SproutCore actually DOES support IE 6. Interesting huh?

If Apple can do it… who next?

Jun 18

Keeping Google honest; The power of not being defensive

Google, Tech 3 Comments »

Shake Hands

I may, or may not, agree with the opinions of Steve Yegge

Being an employee of a large company is interesting. If you work for companies like Apple, Microsoft, Yahoo!, and many others, you will have some of the same experiences. You represent the company. You hang out at a wedding and someone finds out “oh, you work for Google.” You wonder what is coming next. Should I have remembered me t-shirt that says “Just because I work for Google doesn’t mean I will fix your computer”? Will you get the “can you fix this one issue with my Gmail” thought? Or, the “man your search ruuuuules”, or the “Are you big brother?”

I have learned not to be at all defensive if I get asked questions about privacy and data. In fact, just last week, one of the nice chaps who created Masterplan The Movie showed up to an event in Munich. He kindly said hello and we started to talk about some of the issues. I think that he may have expected me to get defensive.

The problem is that I can’t “prove” that Google believes in its “Don’t be evil” mantra. I personally believe in it, and have seen it in action on a daily basis, but you may not have. How could you just take my word? What I can do is ask you to look at our actions, both in the past, and in the future. Google’s entire business model requires trust. You could switch from google.com to another search engine very easily indeed. There is no lockin there. So, we need to provide you the best search results available, and we need you to trust us that this is the case.

Trust came up the other day when someone blogged about the Ajax Libraries API launch. As you know, the launch was all about how we are hosting popular open source JavaScript libraries, and the skeptics quickly wondered why Google would do that. “What is their business motive.” One chap pondered on the fact that if we were delivering jquery.js to him, we could put any old JavaScript in there to do anything we wanted. Maybe we would add some kind of tracking to help us target ads.

Again, rather than arguing “hey we are good guys”, it was easier to talk about reasons why that may not make sense.

For example, a lot of sites use Google Analytics, and embed urchin.js in their pages. A lot of sites. We could do anything we want there too, but why would we. If we got caught out can you imagine the blogosphere. Arrington would be shouting bloody murder about Google. We would lose trust, and that would hurt.

Some may grow frustrated with the skeptics, but I applaud it. There are a lot of people from within that are pushing boundaries. Internal Googlers are not shy about calling fowl if they see it happen. With people watching every move of Google, especially with the high bar that we set with the motto, we are more likely to truly do the right thing. If we step over the line, people are there to shout back and us, and that keeps us honest.

So, thanks for the skeptics. I won’t try to persuade you how good we are at Google, just keep on watching.

Jun 17

Addressbook History goes into the cloud with App Engine

Ajax, JavaScript, Python, Tech with tags: 1 Comment »

I recently built an example of the Form History Pattern using an Addressbook case study.

I found myself talking about App Engine on the On Air tour, so I decided to change the example to not store the data locally with Gears, but instead to save it away into the cloud via App Engine.


Why did people want to hear about App Engine at an Adobe conference? I think that Jonathan Schwartz got it when he mentioned rich internet back-ends. As you build rich clients, you suddenly realise that the promised benefits of web services can kick into gear nicely.

Addressbook Services

Back to the sample. The architecture change was quite simple. Where I was doing a local DB save, I would call a back-end service such as /loadcontacts or /savecontact depending on the task.

You can view and download the full App Engine project code for this sample, and you can see it running live on App Engine

Check out the video below, or view the high quality version (recommended) to see the code walk through, and the various tools that App Engine gives you to develop, debug, and monitor your application running at a few thousand feet.

Jun 16

From Beer to Wine; Flying App Engine from Europe to Napa

Adobe, Google, Tech 1 Comment »

I have had an interesting week to say the least. I had the pleasure of joining the Adobe On Air tour of Europe in Prague. It was my first time to the city, which is a beautiful blend of east and west Europe.

The Adobe mini-conference was held at a great brewery, and we got the tour the night before. The Czech folks take their beer seriously, and they are the inventors of Budweiser, but don’t hold that against them…. their Budvar is actually good (and not like having sex in a canoe!)

Beer Taps

After checking out the taps, we got to taste the beer, which ran smooth. Holding the actual event at a brewery also means that you open up the taps in the afternoon, which gets the crowd in a good mood indeed.

After train rides shared with women and their pets, I got to another place known for beer. Sitting in the Biergartens of Munich, with full Litre jugs to wash down the Currywurst. It was bitter sweat to soak up the Euro 2008 footy action, what with our lads not being there at all.

The event was fun again, as I got to talk more about App Engine to the crowd:

Del Dotto

After a week of beer, I found myself back state-side and on a bus full of Googlers to Napa for an offsite. We ended up at Del Dotto Vineyards where the owner took us on a wild ride of fine wine.

Right at the beginning you will hear him say:

“You guys here do software and that kind of stuff? This is going to blow your mind”

This was one of the finest meals and wine tastings that I have ever had. I can’t recommend it enough! Now, I am ready for some water for the coming week…. until I head to Mexico and Sao Paulo, which will mean Margs and Caipirinha?

Jun 16

Why we need Skype on the iPhone

Tech, iPhone 2 Comments »

iPhone Wifi and Cell Coverage

Above is a picture of my iPhone at my house right now. It is infuriating to have ridiculously poor coverage living in Palo Alto. I have had full bars at the top of mountains, but in the center of Silicon Valley I have one? Are you freaking kidding me?

This is why I can’t wait for VoIP on iPhone 2.0, so I can stick my nose at AT&T as I make decent quality calls from home.

Jun 12

Flywheel: The power of keeping it going

Tech with tags: 3 Comments »


I was talking to a great Google engineer about how Google development can be like a flywheel. Google doesn’t tend to do big bang announcements, but instead goes for incremental growth.

Get something out in beta, and then keep iterating. No vapor, keep the code coming.

We just saw the Gmail Labs announcement, and the wall that shows the iterations of Gmail over the last couple of years. It is cool to see how the extension points are growing. First, people would start tweaking Gmail via Greasemonkey. Then, the Gmail team created some nice formal extension points for Greasemonkey to give a cleaner API. It is interesting to see web applications publicly putting an API out there to make the scripts less brittle. Now with Gmail Labs we see a way to plugin more deeply. The next step.

As I think about the flywheel concept I see how it can be successful elsewhere. It can be hard to keep the pressure up and keep pushing.

The Blogging Grind

I notice this a lot with blogging in fact. I remember back in the day, working on TheServerSide, and having other Enterprise Java communities startup all over. A fine gent sets up ilovemetheEJB.com, starts posting a few times a day, and tries to grow their community. However, three weeks into it Johny Poster realizes that the daily grind is…. grinding. Finding regular posts is hard and time consuming. Two months later and the site is down for the count.

In fact, The Grind is one big reason that TheServerSide and Ajaxian grew. It sure as hell isn’t my writing style!

Hitting the flywheel elsewhere

I am going to try to keep the flywheel pattern going elsewhere in work and life. Wouldn’t it be nice to instead of jumping into a crazy work out / diet regime that only lasts a couple of days…. you start small and slowly grow in a way in which you can manage it.

What if your open source project doesn’t have documentation. Instead of trying to sit down and write the book, how about committing to one short article a week?

Slowly, slowly, catchy, monkey.

Jun 11

I <3 YUI; When people take your comments the wrong way

Ajax, Tech with tags: 3 Comments »

Ben and I gave a talk on the “State of Ajax” at Google I/O a couple of weeks ago.

In there we had a couple of slides that talked about the prolification of Ajax frameworks. Our key points were:

  • There are so many freaking frameworks
  • We used to be able to separate the frameworks into camps. If you sterotype you have: Dojo as the standard lib for JavaScript; Prototype as the simple Ajax/JS wrapper; jQuery as the first CSS driven approach; GWT as the “Want to do Ajax without learning JavaScript and worrying about cross browser?”. These days we have seen normalization. Dojo Core is just as small as the other guys. Prototype and jQuery have plugin communities too. We have jQuery UI, Dijit/dojo.gfx to give you graphics effects a la Script.aculo.us.
  • At some point, depending on your requirements, pick one and get running with it.

We show the dart board morphing to just show a few frameworks. The major point there is to just get one and get going, not that we are blessing certain frameworks.

I started to get emails after the presentation that would say something like:

  • I use YUI. Should I switch to one of the frameworks you mention?
  • Why isn’t ExtJS on this short list?

When I met some of the YUI team last week they said that they had heard some of the same comments. I wanted to make it clear that YUI is a great framework, and based on learning about where they are going next, you are in good hands.

Alex Russell wrote a post on Gears De-Branding which took one (valid) shot at YUI, calling it a “source-available-but-not-open projects”. YUI currently doesn’t score as high as Dojo and the like and I think the YUI team gets that, and we will be seeing a change there in the near future.

Here is the entire presentation, which makes next to no sense without us talkng… but hey, pretty pictures!

Jun 10

You know you are in a European hotel…

Personal, Travel with tags: , 18 Comments »

Euro Hotel

I have stayed in a fair share of hotels, and you can tell that you are in a European one when:

  • The bed is two twins pushed together. It looks quite big. Unfortunately you can’t used one whole side as you can’t sleep on the seam. The pillows are….. comfy
  • The toilet has two buttons. A small one, and a big one, depending on the need. I don’t understand why they don’t do that in the US. Next innovation: size of flush depends on the “weight” of what needs to be flushed
  • The TV controls your world. Setup wake up calls, keep the time with the clock, order room service
  • The shower is walk in. It consists of two panes of glass that try hard to keep in the water, but don’t. Andre Charland also noted that the shower heads always detach, and when attached they often move with a life of their own.