Eye of the Sloth
posted at 22:26 on 2009.10.20
It's training time - my general fitness took a proverbial beating from the demons of stress, work, and take-out cuisine last term, and I'm just now starting to rectify that. (Of course, there's no snow here, so I'll have to settle for Cali sun and SF fog. Woe is me.) To that end, I'm making a commitment to hit the gym at least tri-weekly; encouragement (and light berating, if that's more your style) is, er, encouraged. I'm hoping to make it out to some of the SFPK meets as well. Naturally, I'll be concocting my own personal brand of inspiration - if this cryptic remark has you puzzled (as well it should) you'll just have to keep posted for more details!
Putting the Ignoble in Vignoble
posted at 10:13 on 2009.10.19
Had the chance to wine and dine in the famed wine-producing region of Napa Valley this last Saturday. I decided to don my only suit jacket (and no socks - hey, it's laundry day) for the occasion so as to meet the requisite minimum standard of pomposity. (I should really source a monocle, kerchief, pocket watch, and top hat. As a general rule, you don't argue with anyone who is actively employing all these objects in the service of highbrowdom.)

The Stanford Canadian Club Thanksgiving dinner was a resounding success as measured by the excess of available foodstuffs; there was turkey, stuffing, mashed potatoes, and pumpkin pie in abundance. Yum. Maybe this whole gastronomic shindig should be a weekly affair (or fortnightly, at the very least.) In true seasonal fashion, the leaves are Monty-Python-style suicide-diving off the trees in droves; the air is crisp with that familiar decay-scent, something I had not expected to find this far south.

Important news flash: I just saw a rainbow out the shuttle window. If I were inclined to believe in such nonsense, I'd say that was a good omen for the day.
My One Lunar Cycle No-Post-iversary
posted at 12:16 on 2009.10.16
Yeah, it's been that long. 28 Days Later, stuffs and things at varying orbitals of excitement have been happening with acceptable regularity:
  • Not only am I the proud owner of a longboard, but this particular plank of my comprehensive transportation platform now bears the inimitable insignia of one Randall Munroe. (I can only wonder what joyous blasphemies #666 will bring.)
  • Finally made it out to the infamous DNA Lounge; this SF institution has the peculiar distinction of being owned by ex-Netscape programmer Jamie Zawinski.
  • Canadian Thanksgiving shindig, complete with full turkey and pumpkin pie. Need I say more? (No, but I should probably add this: there's another Canadian Thanksgiving dinner this Sunday hosted by the Stanford Canadian Club; despite what their (apparently infrequently updated) site says, it really is this weekend.)
  • Pretty Lights at The Independent last night. If you haven't seen them, you really should.
How's Facebook? (Come on - if you care enough about me to read my pithy musings, you're probably expecting an answer to this question.) Intense. It pains me to say it, but Facebook has so far provided much more in the way of personal development and work-related awesomeness than Google ever did. How can that be? It comes down to recruiting strategy: Google casts as wide a net as possible, hoping to grab what it considers to be the best of the best before someone else does. In my opinion, this strategy is bound to backfire. You end up with a zillion interns and, well, less than a zillion interesting and/or useful projects; it doesn't take a math major to see that you can't pair each intern up with something worthwhile to work on. (It does take a math major, however, to look at the whole situation and start rambling about bijections.) Here's the point: half of the interns coming out of Google are extremely wary of returning, and that can't be good. ("Half" here is an extremely unscientific guesstimate, but several co-interns (who will obviously remain nameless in such a public forum as The Internet) have expressed similar sentiments.)
The Pirates United Will Never Be Defeated
posted at 15:13 on 2009.09.19



"We have, ourselves, full confidence that if all do their duty, if nothing is neglected, and if the best arrangements are made, as they are being made, we shall prove ourselves once more able to defend our Internets, to ride out the storm of war, and to outlive the menace of tyranny, if necessary for years, if necessary alone.
Even though large parts of Internets and many old and famous trackers have fallen or may fall into the grip of the Ifpi and all the odious apparatus of MPAA rule, we shall not flag or fail. We shall go on to the end, we shall fight in France, we shall fight on the ef-nets and darknets, we shall fight with growing confidence and growing strength in the air, we shall defend our Internets, whatever the cost may be, we shall fight on the beaches, we shall fight on the baywords.org, we shall fight on the /. and on the digg, we shall fight in the courts; we shall never surrender, and if, which I do not for a moment believe, the Internets or a large part of it were subjugated and starving, then our Empire beyond the seas, armed and guarded by the Anon Fleet, would carry on the struggle, until, in Cerf's good time, the New World, with all its power and might, steps forth to the rescue and the liberation of the old."
Onwards and Upwards
posted at 17:04 on 2009.09.15
Congratulations, Facebook! Now for the other 6.4 billion.

(Side note: looks like Google's playing Wolfram Alpha's game. Round Two: fight!)
The Ongoing Saga of Evan’s Search For Housing in San Francisco
posted at 00:18 on 2009.09.15
I've finally uploaded a couple of albums, as promised - one for our intern-squad trip to LA, one for random.choice() style samplings of SF. The latter album will hopefully expand as the term progresses!

The small handful of people that actually read this thing might have noticed a considerable lull in post volume - and not without good reason. For illustration, here's a timeline of my weekend:
  • Friday, 9 pm: pass out from exhaustion. Turns out I still haven't caught up on sleep from the month of death, a fact which late-night mid-week meanderings in Mission can only exacerbate.
  • Saturday, 9 am: wake up, foot it to Lower Haight for breakfast.
  • Saturday, 11 am: still at breakfast place, firing salvos of Craigslist replies. Aiming for the clusterbomb strategy; the housing search in San Francisco is not exactly easy, especially when you're a male international student looking for something short-term.
  • Saturday, 12 pm: moved on to Upper Haight, where I score myself a longboard.
  • Saturday, 1 pm: running laps around here to the dismay of tourists and local art cognoscenti alike. Still need practice before I can take this thing to the streets.
  • Saturday, 2 pm: finally work up enough confidence to book it down to Stockton and Market, where I've got an overpriced screen-repair appointment at the not-so-aptly-named Genius Bar.
  • Saturday, 4 pm: with everything in working order, I work my way back to the hostel.
  • Saturday, 5 pm: keycard doesn't work. Uh oh.
  • Saturday, 5:30 pm: I learn that, contrary to my understanding, the hostel has fubar'd my reservation; I was supposed to check out this morning. At least they're nice enough not to charge me for the privilege.
  • Saturday, 6:50 pm: after a hasty sack-packing and another ear-grinding leg on the BART, I'm standing on the San Jose-bound platform at Millbrae Caltrain. The plan? Lug myself to the office, drop my stuff off, and find a nice comfortable couch to crash on. Oh, and I just missed the train.
  • Saturday, 8:30 pm: I finally get to the office.
  • Saturday, 9 pm: I check my email, where I find a welcome bit of good news - one of the Craigslist postings actually responded.
  • Saturday, 9:30 pm: One of my coworkers happens to be working late on a rush job; he kindly offers me a place to crash for the night.
  • Saturday, 11 pm: I'm watching Clash of the Titans. Hey, this nomad business isn't half bad.
  • Sunday, 11 am: me, my longboard, and I make it out to the Caltrain for a trip back into SF. Not having a place to stay, I ping jverkoeyen; he volunteers the services of his fine floor for the cause. Random discovery - turns out there's a farmers' market right outside California Ave. Caltrain every Sunday.
  • Sunday, 2 pm: standing at Embarcadero and Market. The Craigslist poster rings me; I've arranged a viewing at 4 pm. Between then and now, I've got to find Jeff and get my ass across most of downtown SF to the far side of Mission. Whatever will I do?
  • Sunday, 3 pm: turns out Jeff and his girlfriend Emily shelled out for a mattress and bedframe off Craigslist and need help moving it. In return, they'll ship me across town in a Zipcar pickup truck and pass off a set of keys so I can get into their place.
  • Sunday, 3:40 pm: I reach the room I'm viewing with time to spare. The tenants show me around. Good vibes all around; these people are exactly the kind of laid-back I need right now.
  • Sunday, 5 pm: eating in some supposedly Cambodian restaurant near Mission.
  • Sunday, 8 pm: a meal, a spot of rainy longboarding, a none-too-quick bus ride, and a short hike later, I reach Jeff's place. It's exactly as sparsely furnished as I had imagined.
  • Sunday, 9 pm: I find a corner supermarket with the help of a map Jeff left on the counter.
  • Sunday, 9:30 pm: I'm eating a hasty meal of baguette, cheese, turkey, pasta salad, nectarine, and orange juice under Bay Bridge.
  • Sunday, 11:30 pm: restless, I take a brief promenade about the apartment complex grounds. Nice pool; there's something pleasantly surreal about living in the shadow of an enormous bridge.
  • Sunday, 12 am: lights out. Too much busy-work roaming for one weekend.
And that was it. Gasp. I must have covered the whole city a zillion times.

On the upside, I've landed a place to live for the rest of the term; I'm bunking up in my favourite hostel in SF until move-in. That, and I have yet to injure myself longboarding. (Depending on who you ask, that's either a good sign or an indication that I'm not doing it right. We'll see - I've got plenty of time and hills to reverse this trend with.)
Board in SF
posted at 16:32 on 2009.09.12
Shelled out a wad of cash today for a longboard, which I've been (painlessly (so far, at least)) riding around SF on. My goal is to cut door-to-door times in the city core by 60-75% compared to the estimated walking time on Google Maps. (I'd estimate 80-90% for cycling, but this is immeasurably cooler - not to mention far more prone to catastrophic failure.)

And, yeah, I promised pics a few days back. I have yet to deliver on that promise, but I'll definitely post here when I do!
You’ve Been Facebook’d
posted at 22:48 on 2009.09.10
Where "you" is TechCrunch. Long live engineer humour!
Where Two Files Meet
posted at 14:52 on 2009.09.03
(Note: I promise that I'll post something more generally interesting before this day draws to a close, for non-technical values of generally interesting.)

Let's say that you have two large unsorted files, each of which is essentially a long list of strings, and you want to find their intersection. There's the simple brute-force way:

while read line; do grep "$line" file2; done < file1

There's a problem - this is quadratic! Fortunately, we can cut this down pretty easily with the old time-memory tradeoff:

sort file1 > file1.sorted
sort file2 > file2.sorted
sort -m file1.sorted file2.sorted > combined
diff combined <(uniq combined)
Denouement
posted at 09:52 on 2009.08.13
"It is criminal to steal a purse, daring to steal a fortune, a mark of greatness to steal a crown. The blame diminishes as the guilt increases." -- Schiller
I was sitting in the City Cafe (accent intended) Bakery (held in slightly-above-average esteem by the professor who brought Waterloo's CS frosh such delights as Scheme), taking a quick breakfast with my brother; this quote was written on their blackboard. City Cafe is an economic enigma. They have no cashiers, opting instead for a self-serve honour-system model; you deposit your payment into a bus fare box (Cleveland Transit, I'm told, although I've never verified this) before leaving.
Question of the day: why does this work? By traditional economic theories, the dominant strategy is to eat and run. One theory holds that this is a form of the tit-for-tat strategy: the City Cafe Bakery places trust in its customers, who then feel compelled (perhaps because reciprocity helps maintain social norms) to pay. Another possibility is that the players are maximizing self-interest according to a different payoff function. There might be quantifiable reward in keeping the bakery open or in appearing honest to one's friends. (It is notable that customers often leave tips - maybe it is psychologically easier to tip when the register and tip jar are combined into one receptacle!) There is also the novelty factor; by following an unorthodox business model, they generate a certain amount of word-of-mouth buzz.
(According to Schiller, your best strategy is to grab everything in the bakery and run - that way, you minimize blame!)


Denouement (again, accent intended) comes from the French noeud for knot; the literal translation is "unknotting". I'll leave that open to interpretation.