Powdercattin’ it

March 17, 2008

Some of the best memories I have of the 1990s is of ripping sidecountry runs with my friends at Stevens from the first chair to the last, pulling 9AM to 10PM days with a brief 5PM stop to dry off and power-nap.

We drifted apart over the last couple of years, due to lifestyle changes — jobs, infants, moves, etc. But we got back together this last weekend for a day of guided riding with Cascade Powder Cats. This late in the season, I didn’t exactly get my hopes up for epic conditions, but I was definitely looking forward to spending time with the old crew (and by old, I mean we’re all circling 40 and quickly moving north).

In fact, as the week started, temperatures were high and rain was plentiful, lowering my expectations of the conditions to basic guanch — aka Cascade Concrete — layered over random death cookies. But Tuesday night, temps dropped and the rain stepped up. I willfully ignored the snow reports, because (a) I wanted to follow the Law of Low Expectations, and (b) we were going to be guided, and so keeping up on snowfall, temp ranges, wind load, etc was effectively outsourced.

We pulled in late Thursday night to the pornographically named Mysty Mountain Cabin (I mean the only time I’ve ever seen anyone named Mysty was set to the backbeat of a lame disco soundtrack, and involved a Pizza Delivery Man) nestled just north of the damp and moss encrusted idyll of Skykomish. The next morning we woke up and rolled up to the headquarters of CPC, just off to the side of highway 2. We loaded up into one of the cats and trundled off around the ridge.

9 miles later we jumped out, underwent a brief recap of avy training using digital transceivers, and jumped back into the cat for a ride to the top.

One potentially limiting factor: I hadn’t ridden in 6 years. I have no idea how that happened, but there you have it. So as we unloaded, strapped in, and got some instructions from the guide on where to go, I was kind of wondering if I could even turn anymore. As usual, rational thought was overridden by the potential for fun. Fortunately, riding powder — especially light, fluffy powder — is like riding a bike. It all came back after the first three turns and there I was, with the rest of the guys, hooting and hollering like a complete idiot 🙂

me_and_jay.jpeg

Cat riding rules. The guys at CPC were awesome. Harlan, the lead guide, was super cool, setting us up epic after epic after epic… Jeff, the sweep guide and one of the owners, was as excited as we were to be out in such killer conditions. The cat driver (I forget his name) was a total stud, I had no idea cats were so maneuverable. At lunch they took us into the yurt for some sandwiches, tomato soup, and oreos. Any gourmands might be snorting in disgust right now, but that’s exactly the fare to refuel with in the middle of a big day. Fast and good eating, minimal down time. Back in the saddle.

ridin_high

This is what we rode: wide open bowls followed by perfectly spaced glades littered with super fun rollers that started with an ollie and ended with a pillow soft touchdown. Had we been younger, bolder, and riding more, they would have pointed us to cliff drops and windlips, but we were more than satisfied with the ride quality and selection.

where_my_teeth.jpeg

By late afternoon I was getting pretty beat, but only felt it on the ride up. Once we strapped in for the next one all pain was forgotten — sure, the reflexes were getting a little slower and the legs had a little less pop, but the spirit was still willing. Even though we had left the Vitamin I at home.

The last run was a hero run, the boys at CPC obviously were catering to our aging legs and our youthful egos. It started with a traverse into a bowl so wide open that we were all gripped with ‘Point it or Slash it ?!?’ syndome. I opted for GS turns, keeping the speed while feeling the g’s of a nice arcing powder turn, driving my back foot down and letting the front ride free. The snow was still light, and fast, and the angle was relaxed enough so that we could enjoy it without maxing our battered legs. It was the perfect way to end the day.

The next day, after passing out promptly at 10PM (so much for traditional bachelor party hijinks :)), we rallied for a half day at Stevens, our old stomping grounds. Of course we all talked it down, claiming tiredness and expecting chopped up conditions. While inbounds was quite chopped up, requiring jump turns, focus, and legs I didn’t quite have, time had stood still in all of the powder stashes, and there was still incredible light pow to be poached just out of bounds on skiiers left past Southern Cross. We were 15 years older, but riding the same glades, ripping the same lines, smiling the same stupid grins, and feeling the same stoke.

old_skool_posse.jpeg

So now I’m heading back into a high pressure week at work, but feeling so much better than I would have sans 2 epic powder days. I think I’ve lost my way in the last couple of years. In the middle of having a family and getting real about work, I’ve forgotten some of the basic essentials of good living — basically making time to have great adventures outside with good friends that get as stoked as I do, whether we’re riding powder, or climbing, or doing a killer ride. It’s a little late for a new years resolution, but here I go. 2008, despite work and family and a busy life, needs to be balanced, sprinkled with days like the last couple. One of the guys said it much better than I could ever have: he turned to me in the cat after yet another epic ride and said “I mean it’s not like I’m going to be on my deathbed saying ‘I could’ve worked more, or finished that project earlier’. We’ve got to get back on this while we’ve got cash, time and legs.”

Advertisements

Data Liberation via the Script Tag and wrapped JSON

March 3, 2008

Mashups excite me because they allow a user to extract personal unique value from applications that were not designed to do so — at the risk of butchering a metaphor, it’s a recombinant effect — mashups leverage common protocols and allow people to mix data in ways that the original data providers couldn’t have imagined.

But this kind of a data sampling is not as easy as pulling data in from specific sites, due to cross domain scripting limitations that disallow javascript loaded from one domain to request data from another domain. In order to get around this limitation, you need to proxy the call to the other domain from your own server. This limits Mashup creation because I can’t just drop in a call to my favorite data provider on my blog or my homepage. Kind of a downer.

Fortunately there has been a way around the cross domain limitation for a while — here is my understanding of how it works.

The Script Tag

While Javascript is constrained by the same origin policy, the src attribute of the script tag is not. So you can load javascript from another domain with no ill effect. This is how you would load in js from another website. Note that if you load javascript via a script tag, you need to actually use that javascript in a subsequent script tag. So we can actually access javascript from another domain — now how do we actually use it?

Script Tag rendering

A Script executes the script in its src tag when it is rendered by the browser. If we return JSON from a src attribute of a script tag, we have instantly executable code. But we don’t actually have a way to access that code — the tag below:

<script src="http://arun.com/js/someJavaScript.js"/>

may map to

{{data}}

<script>

eval({{data}})

</script>

but there is nothing to assign that data back to — no way to assign the data back to javascript code.

Wrapping my JSON

The final piece in the puzzle is the use of callbacks — by wrapping JSON in a user specified callback, we can return data from an outside domain to a user defined function.

The user can specify the callback as a parameter to a method defined in the remotely included js:

<script src="http://otherdomain.com/js/some.js"/>

where some.js has that method defined:

function returnRemoteData(options) {

callback = options[callback];

var head = Document.getElementsByTagName("head")[0];

var newScript = document.createElement('script');

newScript.id = 'remoteAccessScript';

newScript.src="http://remotescript.com/js/remote.js?callback="+callback;

head.appendChild(script);

}

and the user calls it as follows:

<script>

function execRemote(data) {

var data = eval(data);
...
}

returnRemoteData({callback: execRemote});

</script>

returnRemoteData will cause a new script tag to be created that requests source from http://remotescript.com/js/remote.js, passing the user specified callback method as a parameter. This is important because the return from that call will be:

execRemote({{JSON data}}), which will get executed by the script tag.

If I were writing an API, a la Yahoo/Google, I would keep the user from having to know about the new script tag, etc, by wrapping it in my code. This makes it super easy for them to access the data I provide by including my js files in their page, and calling my functions with their callbacks.