Location Capital

Traditional forms of capital include money, relationships, and health. There’s another I’ve discovered but never heard mentioned before: location capital.

Location capital is how much experience you have with a physical place on Earth. For example, if you have a lot of New York City capital, you’re the one that knows all the cool restaurants and bars in NYC. Friends ask for recommendations for the perfect spot for their birthday.

Everyone has location capital of some kind. But no one can have all the location capital for every place, so everyone (even Jeff Bezos) needs to decide what places are most important for them to build capital in.

It’s useful to be aware of location capital because it can affect your decisions around where you spend time.

Let’s say you’re alone and deciding whether to eat out at a restaurant you’ve never been to. What’s the cost/benefit? In exchange for money, you get good food and save time & labor (from not cooking/cleaning/grocery shopping).

But that’s not all — because you’re going to a new restaurant, you also build location capital. This is a one-time “boost” you get from going to a new place. On further visits you’ll still get some, but less.

Your decision will ultimately depend on how much you value food, time, labor, money, and location capital.

Location capital can also act as a hedge against risk. If you’re planning a date, preferring a new place will help make sure your time isn’t totally wasted if the date goes poorly.

I wish I was aware of location capital sooner. I used to prefer staying in over eating out in order to save money. But now I realize those decisions came with opportunity cost. And as a result, I’ve built less capital for the cities I’ve previously “lived” in than I’d like.

In general, I think it’s a good policy to always be building capital (mostly the non-monetary kinds). Location capital is an interesting form of it and being aware of it can influence how you live your life.

Remote onboarding

The biggest challenge when onboarding remotely was getting a feel for the culture. Without this, you have to play it safe and act conservatively (i.e. maximally professionally), however it can be draining to always be so buttoned-up.

The two things that helped me feel more comfortable were:

1. Seeing “micro unprofessionalisms” during zoom calls.

One colleague had a large drawing of “No Face” from Spirited Away on his wall.

Another’s cat jumped onto the desk, and then a baby ran into the room.

Another just had a mess in the background.

All of these show humanity and personality. They let the new team member know that the tone is relaxed and that there’s no need to stress over behaving perfectly “professionally”.

2. Getting hints from coworkers about work norms.

I have a coworker that’s brutally productive. But one day he said, “I’m going to be out for a few hours this afternoon to get my trombone fixed.”

It’s easy to overlook such a remark if you’re been on the team a while. But for a new joiner, even small comments like this provide valuable insight into what is and isn’t acceptable on their new team.

To make your new team member’s remote onboarding experience more comfortable, be intentional about showing humanity — visibly display things that are unique to you (and un-blur your background). Also, remember that your team’s culture exists, must be learned, and can be proactively communicated.

Short thread about LLDB pretty printing internals

Tips for writing LLDB pretty printers

LLDB supports custom scripts (“variable formatters”) to pretty print C++ data structures. For example, std::vector is typically implemented as a struct with three pointers: begin, end, and capacity. But if you wanted to print out a std::vector variable during a debugging session, printing out these three pointers isn’t likely to be helpful. What you actually want is to print the contents of the vector. Pretty printer scripts allow for doing this for your own data structures.1

Here are a few tips to supplement the official documentation. Sudara also has a great post on the topic.

Continue reading

My audio development journey

Wrote a thread about it:

I get asked why I’m into C++ and not Rust.

I get asked why I’m into C++ and not Rust.

Above all, it’s pragmatic. C++ is simply what’s used for the work I aspire to do, and I don’t have time for both.

Beyond that, I still think there’s at least one reason to learn C++ today: out of respect for where it’s gotten us. A lot of lessons to learn from something that powers the world, flaws and all.

And when you do learn Rust, you’ll understand it better. The C++ context will give you a deeper & more intuitive appreciation for why it’s like it is. 

Rust wouldn’t be what it is without C++. 🤝


git diff can natively detect code movement

Linux Internals: How /proc/self/mem writes to unwritable memory


An obscure quirk of the /proc/*/mem pseudofile is its “punch through” semantics. Writes performed through this file will succeed even if the destination virtual memory is marked unwritable. In fact, this behavior is intentional and actively used by projects such as the Julia JIT compiler and rr debugger.

This behavior raises some questions: Is privileged code subject to virtual memory permissions? In general, to what degree can the hardware inhibit kernel memory access?

By exploring these questions1, this article will shed light on the nuanced relationship between an operating system and the hardware it runs on. We’ll examine the constraints the CPU can impose on the kernel, and how the kernel can bypass these constraints.

Continue reading

The tradeoffs in using -Weverything

In addition to the well-known -Wall, clang offers another interesting warning flag: -Weverything. While it sounds like a “strictly better” option (the more warnings, the better?) it’s not.

This topic is already well covered by Arthur O’Dwyer’s blog post and the clang documentation.

Arthur makes a strong case against use of this flag. The clang docs generally agree, though offering a slightly more lenient position:

If you do use -Weverything then we advise that you address all new compiler diagnostics as they get added to Clang, either by fixing everything they find or explicitly disabling that diagnostic with its corresponding Wno- option.

But what I have not seen clearly expressed is how use of -Weverything is a tradeoff.

Continue reading