Blog | Admin | Archives

Now Serving: Minimus

Silverfir.net is now hosted by Minimus, a new server that Dan put together with funds that he and I pooled to replace the aging, big, and noisy Frankenputen.

The changeover took place early this morning, after hours of struggling against forces that I had never before met, namely AppArmor, a security system in Ubuntu Linux that is newly enabled-by-default as of Ubuntu 9.04. Specifically, it prevented Mysql from reading to a new directory I had set up for it on the non-root drive. Once I knew what the problem was (after barking up the wrong permissions trees for a long time), the fix was fairly simple — adding a couple of lines to Mysql’s AppArmor config, and bouncing AppArmor made everything work fine.

The only remaining issue appeared to be Gallery’s non-relative-path issues, which I temporarily fixed up using a symlink. but, Scott, Dan, and I all need to update our Gallery configs to use the right path, because one of these days I’m going to delete the symlink.

Of course, if you used to have a user account on SilverFir, you probably don’t anymore, unless your name is ‘Dan’ or ‘Ryan’. Send me a message about it (email is best. but a comment also works) and I’ll set it up for you. Also, if you notice anything not working, let me know, and I’ll look into it.

Minor Miracles and Marathons

One week ago, I completed the Portland Marathon. Even as I started out, I truly did not expect to finish, because two weeks ago, I hurt my feet. Initially, I thought my feet would heal within the week and I would be able to do the marathon, but at the week wore on, my feet weren’t getting better. So, I slowly came to the realization that I would be watching my friends run the marathon, not participating myself.

Down in Portland, however, my mom suggested that I invest in some new shoes, since the ones I had were fairly battered. I thought it was a bad idea, because breaking in new shoes during a marathon didn’t seem that smart. But then my friend Scott, who run done a few marathons in his time, agreed with her, saying that good running shoes don’t actually need to be broken in. Thus I found myself in a Sports Authority on Saturday night buying new shoes.

Also on Saturday, I spent some quality time in a hot tub, which seems to have, in large part, miraculously healed the blistering and bruising on my right foot. Combined with the new shoes, I suddenly started believing again. Maybe I could complete the marathon. I really wanted to get this out of the way, because during training I discovered that I didn’t like long-distance running at all, and if I didn’t finish the marathon now, it would bother me until I finally did, so getting it out of the way was pretty important to me.

And thus, I found myself on the start line of the 2009 Portland Marathon, in new shoes, new shorts, new socks, and wondering how far I was going to go. I started out by walking. I found that by turning my left foot a little further out than normal, combined witht eh new shoes, I could eliminate the pain that I usually felt in that foot. The right foot, as discussed earlier, seemed to have spontaneously healed in a hot tub. Or maybe it just got better all week and I didn’t notice until after getting out of the hot tub, but that story isn’t as fun. And so I walked. And walked. And walked.

A few miles in, I was feeling alright, but I was still skeptical about my chances of finishing — after all, the previous week, I had felt pretty good until a popped blister suddenly halted my progress. When asked by my cheering family if I thought I would finish, I simply shrugged, and kept on walking. About 10 miles in, still walking, I noticed that my left knee was protesting a little to my left foot’s new outward position, so I started changing the position of my left foot around a little, which helped enough to keep going.

At the half way mark, I actually started to believe for real. I was slowly feeling worse, but I could tell that the rate at which I was feeling worse would get me well past the finish line. So I continued to walk, miles slowly ticking off as I continued to pound sports drink and occasional gummy bears from enthusiastic volunteers.

Walking gives one a lot of time to talk to people around you, since it certainly isn’t your respiratory system that is maxed out. I met a few nice ladies (I seemed to be in the pace preferred by 50-60 year old women), and generally had a good time, depsite the creeping pains.

Around mile 24, I started flirting with the idea of running the rest of the way, but I found that it was hard to get myself to change the motion that I had been doing for six hours already. At mile 25, however, I actaully did start running, albeit slowly. Even at the barely-running pace, I was quickly passing people, which helped me keep it up. But I promised to myself that I would actaully kick up my feet and really run after mile 26. Thus mentally preparing myself, I found that I actually could do it this time, and I came across the finish line considerably faster than anyone else around me.

Six hours, fifty-five minutes after I crossed the start line, I finished a marathon.

It was nice to be done.

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