Blog | Admin | Archives

New Years Resolutions 2011

A bit late, but last year I didn’t do this as all, so I wanted to make sure I did them this year.

This is a post that will be updated a few times before I’m done, but here goes the first few:

  • Do at least one triathlon this year
  • Play tennis every week
  • Count my blessings but never be satisfied

Where is the missing library supposed to live?

For about a month, I was living with a constant stream of warnings whenever I ran a common command at work. While it didn’t make me less productive, since it didn’t affect any functionality I needed, it annoyed me and it bothered me that I didn’t know how to fix it the right way. The error I was getting was a warning about a dynamic library not able to be loaded even though the library existed on the system. Furthermore, when I ran `ldd` on the binary, the dynamic library wasn’t listed.

A quick hack was to find the library and set LD_LIBRARY_PATH to override the normal include paths. However, this didn’t work for automated scripts run from cron without some wrapper to set up the environment, and it felt very hacky anyway. What I wanted to do is find where the system was looking for the library that it couldn’t find so I could put the library in the right place (or at least set up a symlink).

Today, I decided to figure it out, and through some searching I came across this treasure trove that exactly explained the problem and the solution.  Basically, the issue is that linux binaries (including libraries) have an rpath where they look for their shared objects. Setting LD_LIBRARY_PATH overrides this, but as I said, it’s a hack. To figure out the rpath, simply run:

readelf -d <path/to/binary> | grep RPATH

You can run this on any executable or library, so even if a library includes another library, you can just follow the path down until you find where the system is looking for the missing library and fix the problem.

Faceversary

Today marks one full year that I’ve been working at Facebook. It has been the most consuming, thrilling, and educational work experience I could imagine.

Looking back at what I’ve already done — from hacking on MySQL to presenting at a conference to a packed house; from taking ownership of core modules to helping decide the direction of Facebook’s infrastructure; from pushing code to 300 then 400 and now over 500 million active users to debugging site issues at an unprecedented scale… every experience has helped me grow as a person and an engineer.

Facebook surrounded me with some of the brightest people in the world to work on some of the most interesting technical challenges anywhere, while providing the support to make it possible and the autonomy to make it my own. I could not have asked for a better job.

Here’s looking forward to what I’ll be able to accomplish in my next year.

Sufficiently Momentous

Now it is sunny.

P = NP problem solved?

Pretty big news breaking today about a possible breakthrough on the P vs NP problem, probably the most important unsolved problem in computer science today. Everyone suspects, to a degree bordering on knowledge, that P != NP, but no one has been able to prove that it is the case. Falsifying this belief (that is to say, proving that P = NP) would be rather catastrophic for cryptography and very shocking to everyone in computer science, although perhaps it would also unlock amazing new possibilities in computer algorithms. According to a recently distributed (leaked?) paper, cryptographers can remain calm since P != NP. Even though this is what people believe, its proof would be a significant milestone for computer science.

I promptly downloaded the paper, and as I suspected it was way out of my ability to comprehend without looking things up every few seconds at least, so if I really want to dive into the proof, I’d have to devote a lot more time to it, and if I really want to understand it I will have to devote years of study to complexity theory — assuming I’m smart enough to even get there. Nevertheless, if you want to take a look at the paper, but don’t want to download it from the login-required Scribd link that everyone seems to be sharing, you can grab it here.

Old La Honda to Lexington Reservoir Loop

Pretty epic afternoon ride today. I started by searching out the Old La Honda Road climb to Skyline Boulevard (I took a wrong turn the first time and had to loop around to find it again), and then I headed south on Skyline all the way down to Black Road, which turned out to be a pretty crazy descent down to Highway 17. I found my way across, and then encountered an unexpected gravel descent on the Los Gatos Creek Trail. A mountain bike would have been appropriate at that point, but I survived. I then made my way back via Los Gatos-Saratoga Road and Saratoga-Sunnyvale Road before stopping for dinner at In-N-Out on El Camino and finishing up the ride. Skyline turned out to whip me pretty well, and I was struggling to keep up the pace on the flats afterward. Half of that is mental discipline, and the other half is physical readiness. At any rate, I haven’t been this sore after a ride since last year’s Seattle to Portland bike ride, which was more than three times as long.

  • Distance: 66 miles / 106 km
  • Time: 4:50:51
  • Average Speed: 13.6 mph / 21.9 kph
  • Max speed: 39.2 mph / 63.0
  • Cumulative ascent: 3820 ft / 1164 m

Crystal Springs Ride

MapMyRide.com says 40.5 miles; My odometer said 43 point something — the truth is somewhere in there, as I did a few side sprints.