Blog | Admin | Archives

Blistering

Today I went for my final “tune-up” walk/run before next week’s Portland Marathon. I know by now that there is no way I will survive actually running 26 miles, so I am planning on a hybrid walk/run (mostly walk), not unlike Theo, although I certainly won’t be keeping up 8 minute speed-walked miles.

Today’s adventure consisted of 14.3 miles in about 3.5 hours, which is around 4 mph. I walked the first 9 or so miles at a pretty good clip, then started running back on Middlefield. A few miles into the run back, I had a sharp pain in my heel, so I stopped to check it out and found a popped blister. I found it hard to even walk in my shoes immediately after that, so I actually went barefooted for about a half mile before deciding that shoes would be better in the long run.

So, I put my shoes back on, and adjusting my gait a bit, was able to stay mostly pain-free. I even got up to a pretty good clip with a modified gait and a good amount of ignoring the pain.  At Loma Verde, just over a half mile from my house, I ran into a friend from work, who was tooling around town in his brand new rally blue Subaru Imprezza WRX. He offered me a ride home, and it was a pretty good way to end an otherwise kinda crappy walk/run.

20090927-walk-run

I managed to listen to music the whole way, thanks to the iPhone and another not-as-advertised iTunes experience. But that may earn its own post.

Patching PuttyCyg to Send Ctrl-Tabs

Recently, I started using Windows 7 on my laptop, which lead me to adopting PuTTYcyg as my terminal of choice. Also, in large part due to my new job at Facebook and my misgivings about some aspects of Mac OS X, I’ve been experimenting with my terminal setup a lot recently. My research during this time led me to learning about patching PuTTY to send ctrl-tab and ctrl-shift-tab. I thought that sounded like a good idea, but of course I was using PuTTYcyg now, so I had to do the patching myself.

It turned out that downloading and patching the code was straightforward enough: With a few development packages in cygwin (namely make and the normal C/C++ gcc), make worked (almost) without a hitch. All I had to do was download the PuTTYcyg icon (which was not included in the patch), and everything compiled properly. However, after compiling, when I ran a cygwin terminal, a second windows command-prompt-style window with a bunch of debug info popped up:

PuTTYcyg Issue

This of course was a non-starter, so I searched in vain for a few hours to try to fix this, and ended the night by opening a new issue at the PuTTYcyg home page.

The PuTTYcyg developer pointed me to the Makefile used to build the PuTTYcyg releases. In it are a few special XFLAGS that magically make the extra window not appear:

XFLAGS= -UDEBUG -UNO_MULTIMON

Using the new Makefile, I compiled again, and this time when I ran PuTTYcyg, there was no annoying extra window. Brilliant!

Feel free to contact me if you need any more info.

Mac OS X, Terminal, Screen, and Ctrl-Arrow Keys

I have had a number of frustrations since I started at Facebook in adapting to the quirks of Mac OS X. I have been in Windows-land for so long that I consider its quirks normal, so figuring out the quirks of OS X has at times been frustrating. Nevertheless, I think I am making good progress.

I am using GNU screen while logged in to linux machines extensively during work, so I invested a little time in setting up a good screenrc. Afterwards, I noticed that I was unable to get the screens to switch using ctrl-left and ctrl-right the same way I would be able to from a Windows machine.

After being frustrated with trying to get Terminal to send the right control characters, and getting screen to recognize them using bindkey, I took a step back and found a solution that actually works. Despite its failings at behaving like PuTTY in every respect, Terminal does offer a lot of customizations, including the ability to change what control characters get sent when you press control-left and control-right, for example. So instead of trying to divine the right bindkey option for Mac OS X (which no one seems to have succeeded at as far as I can tell), I took another approach:

I told Terminal to send “ctrl-a p” (\001ap) for ctrl-left, and “ctrl-a n” (\001n) for ctrl-right. This makes hitting those keys the equivalent of going to the previous and next screens manually, but without the manual part. Of course, if you use a different control character for your screen, you will want to use that instead of ctrl-a as I did, but this finally got screen to behave the way I wanted, which makes me quite happy.

For reference, my screenrc looks like this right now:

vbell off
autodetach on
startup_message off
defscrollback 10000

hardstatus alwayslastline
hardstatus string '%{= kG}%-Lw%{= kW}%50> %n*%f %t%{= kG}%+Lw%< %{= kG}'

First Week at Facebook

Friday marked the end of my first work week at Facebook, my new employer. As far as first weeks go, it started off with a bang when I got a new Macbook Pro and an iPhone 3Gs on the first day. I’ve grown to like the iPhone pretty well (the Twitter and Facebook apps, particularly), but I still am having my struggles with the Macbook.

I love the touchpad and the transparent terminals, and the back lit keyboard is sexy and functional, but there are also a lot of keys I miss, especially when I’m away from the extended keyboard at my main desk — home, end, page up and down, and delete (forward) being the leading examples. The function key on the laptop is also misplaced (I prefer control on the outside, as is the case on every reasonable keyboard known to man). The menu-bar-atop-primary-display decision is, quite frankly, terrible. There are also lots of other little annoyances: half of what “should be” control-key is command-key (ie, copy and paste), while the other half is still control-key (ie, changing tabs in Firefox, everything in the terminal).

The end all is that I am seriously considering swapping the Macbook for a Thinkpad. I haven’t made that decision yet, but it may happen next week. Or I may decide to tough it out, since I’ve already learned how to deal with most of the quirks.

Apart from the Macbook blues, the first week went fairly well. The first day was the normal mostly-government-mandated HR stuff, and then on day two I got to check out all of Facebook’s codebase and set up a sandbox. With some onboarding sessions, good documentation, and some help from a knowledgeable returning intern, I was actually able to be a little productive in my first week, a vastly different experience than I had at Amazon last summer.

Also, the food has been uniformly quite good to excellent, so living cheaply (except for the exorbitant rent at my too-nice Palo Alto pad), will be possible. At least, I won’t be spending too much money on groceries or restaurants.

Last but not least, there was the news that had to make this the best week to start at Facebook ever:

  1. Facebook hit 300 million active users, another unprecedented milestone in social networking
  2. Facebook became, for the first time, cash flow positive, a year ahead of their own projections

So overall, a good week to start, I would have to say.

Second Bay Ride — Page Mill Road

After watching the Huskies lay down the law against the USC Trojans, I took off on my second “Bay Area Ride” yesterday. I started out on my road bike and headed back to Big 5, where I returned the crappy pump I picked up last week. Then I headed up Page Mill Road, which true to its reputation, offers a difficult hill climb and some stunning views. Fifteen miles into my journey, the sun was getting low in the sky, and I was pretty whipped, so I turned around. No sooner did I start my descent then I head a twang, which sounded a little too familiar. I stopped and checked out the bike, and sure enough, I had lost another spoke on my rear wheel.

I had a long way to go down, with my rear wheel rubbing my brake pads (which I had already loosened) the whole way down. Also, I didn’t know how much lateral stress the wheels could take, so I took it pretty slow around all the curves. It was not as much fun as it otherwise would have been, but at least the bike survived all the way back.

Page Mill is definitely a ride that I’ll want to do again, hopefully to the top soon enough. It is certainly a good way to work on my (rather poor) hill climbing skills.

Bar Area Ride 2

Facebook Tomorrow

Woo, what a summer it has been! The vacation portion finally ends tomorrow, when I have my first day or work since finishing up grading CSE 451 finals three months ago.

As always with a new job, I am a little nervous, but mostly excited for what is in store. From all accounts, Facebook will be a great place to work and cut my teeth as a degree-bearing professional engineer. The fun begins tomorrow at 9:15am.

I have been planning on biking into work, but if the current rain keeps up, I may boot that idea in favor of showing up to work dry, at least for the first day.

Bay Area Cycling

Today I went for a nice leisurely 20-ish mile bike ride around Palo Alto.

bikeride_20090912

Leaving my new house, I first visited Facebook’s headquarters, where I’ll be starting on Monday. Then I went by a Big 5 to pick up a bike pump, which I immediately used to get my tired up to 60 psi, before heading out for the rest of the Journey. I headed up University Ave to look at the outside of a condo I have my eye on, and then I continued to the shore, before returning via University Ave once again. It was a nice ride with only one hitch: a crazed bee (or similar) stung me on my right hand in some sort of odd glancing blow that left me hurting and it long gone. My hand is a little bit swollen, but I figure it will be fine in a day or so.

Out at the bay, there were a few cool places, but they all seem to be closed:

IMG_2739

After the ride, Brian came over from Alameda, and we ate Thai and then watched Primer (always an excellent movie).

One day of unabashed freedom left, then it’s time to get to work!