Monday, February 8, 2010
Happy groundhog day

Happy groundhog day

Sunday, February 7, 2010
damnit ruby.

damnit ruby.

Saturday, February 6, 2010 Saturday, January 30, 2010
I love Vermont.

I love Vermont.

Tuesday, January 26, 2010

How Google tracks clicks for backpropagation

I was wondering a few nights ago: How does Google track clicks for their backpropagation algorithms? So I cracked open Firebug, did a search and watched the Console tab while I clicked a link. I was expecting to see a nice little XMLHttpRequest go across the screen… and didn’t.

Upon further inspection, I found that the links in search results all had inline onclick handlers:

A call to clk() in the console tab just returned true, so off to the source for clk() I went.

Cmd+U… Cmd+F… ‘clk’…:

  window.clk=function(d,e,f,j,k,l,m){}

Those sons of bitches. Back to Firebug, and the Net tab. At this point, I noticed a whole bunch of requests that had responded with 204s. The request for these 204’d documents had image/png and image/jpg in the accepts header, and it hits me: they’re pixel tagging. Very clever. But I still want to find clk(), so I see in the Net tab where there was a 19k JS file requested, open it up, do a search, and with a little bit of manual de-minifying:

function(d,e,f,j,k,l,m) {
  if(document.images){
    var a=encodeURIComponent||escape,b=new Image,
        g=window.google.cri++;
    window.google.crm[g]=b;
    b.onerror=b.onload=b.onabort=function() {
      delete window.google.crm[g];
    };

    var c,h,i;

    if(google.v6) {
      c=google.v6.src;
      h=google.v6.complete||google.v6s?2:1;
      i=(new Date).getTime()-google.v6t;i
      delete google.v6;
    }

    b.src=["/url?sa=T","&source="+google.sn,
      e?"&oi="+a(e):"",f?"&cad="+a(f):"","&ct=",
      a(j||"res"),"&cd=",a(k),"&ved=",a(m),
      d?"&url="+a(d.replace(/#.*/,"")).replace(/\+/g,"%2B"):"",
      "&ei=",google.kEI,c?"&v6u="+a(c)+"&v6s="+h+
      "&v6t="+i:"",l].join("")
  }
  return true
};

Jackpot.

When you think about it, this makes WAY more sense than an XHR. It’s cross browser, probably a hell of a lost faster (even though I haven’t taken the time to benchmark it), and just so… Google. This may be old hat to some, but I never though of using pixel tagging dynamically in this way. Something tells me we’ll be using this technique in Engineering Alley at Punchbowl HQ in the next few weeks.

Saturday, January 23, 2010
What’s up @jaypeakresort

What’s up @jaypeakresort

Wednesday, January 20, 2010 Sunday, January 10, 2010
not a bad day for a hike

not a bad day for a hike

Monday, January 4, 2010
Ripping freshies @killingtonmtn in Patsy’s.

Ripping freshies @killingtonmtn in Patsy’s.

You're not one of the boys until you're one of the boys

That was said by my college football coach at WPI, Ed Zaloom, on my first day of football camp — and it really stands up there as some of the best advice I’ve ever received.

He was speaking to the entire freshman football class in the stands overlooking the field.  Coach Zaloom — aka Zoomer — was trying to tell us that although we were members of the team from day one, we were not one of the boys. It was my first day.  I could not bust anyone’s chops.  I could not mouth off to seniors.  I should not expect to be in on any inside jokes.  As of the first minute of the first practice I was a member of the WPI football team, but I was not one of the boys.

Now, anyone from that team will probably be chuckling right now.  At the time I didn’t exactly get it.  I was the antithesis of this sentiment.  Not only was I on the football team, I had been lifting there all summer. With seniors!. I had a leg up.  I already had a nickname.  I was one of the boys.

Wrong.  The coach made us part of the team, but I was not one of the boys. Only the team could make me one of the boys. And within a couple days they let me know it — but that’s for another post.

Becoming ‘one of the boys’ takes some time.  But starting out as not one of the boys did not in any way take away from how I was expected to perform and contribute on the team, and I’ve been really amazed at how valuable this lesson has been in other areas of life — especially working in startups.

It’s easy to get cozy real fast in a startup.  Everyone is nice and cool and making jokes and fooling around. People might stroll in at 10am, take off at 4:30pm, drop F-bombs all over the place, run out for an hour at lunch to run a couple errands, and so on. It’s a culture that on the outside can appear quite lackadaisical compared to most corporate environments. So if you’re new to it, you might walk in and think “HOLY SHIT! This rocks!” But what you don’t immediately see is that those people are up at 1am Sunday nights, at the office until 9pm on random Wednesdays, pulling all-nighters to hit deadlines, getting up at 4am to make sure some automated thing is doing its job properly, pulling out the iPhone on dates to make sure the system is up and running, getting a bit anxious when they walk into a movie theater because they don’t have cell service in case something goes wrong, and on some nights even losing sleep over the stress of of the job. The list of stuff like this is so long that as I write it I realize it deserves it’s own post.

Being in a startup is hard fucking work. Don’t forget that when you’re new to the game. Don’t get enamored with being cool, fitting it, making jokes. Go to work.  Do your job.  Kick ass.  Do whatever is asked of you to the best of your ability. And slowly, over time, you’ll become one of the boys.