Dan Luu Profile picture
10 Oct, 6 tweets, 2 min read
I think I failed an interview at FB a long time ago (~2013) because of this.

The interviewer asked me how you can write deadlock free code, and I told him that there's this thing people say about taking/releasing locks in order, but there are places where that won't save you.
The interviewer didn't like that answer and said, about other circumstances, "there's got to be a way".

I discussed some places where that isn't sufficient, e.g., in processor hardware and microcode, where you wouldn't do that for performance reasons even if you could and
of course that's where you implement the primitives that other people will be able to take locks and you can't use the primitive you're creating to implement the primitive itself.

But still, the interviewer insisted "there's got to be a way"
I also gave the meta argument that CPUs have deadlock and livelock detection logic that, when it detects one, effectively randomly perturbs the state in the hopes of putting processor into a good state, which isn't something people would do if there was a better known solution.
But the interviewer continued to insist "there's got to be a way" and seemed to think I was a bozo since I was writing concurrent code without knowing how to guarantee that the code wouldn't deadlock.

Anyway, I failed that interview!
But, on the bright side, at least I didn't miss out on tens of millions of dollars of equity even though I passed the technical interview because I said "hoops".

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Dan Luu

Dan Luu Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @danluu

28 Sep
I feel like it would be useful for programmers, as a field, to acknowledge that humans are bad at programming.

This is because techniques for improving at things you're bad at are different from techniques for improving at things you're good at.
E.g., blunder avoidance is generally high ROI when you're bad and I've gotten a lot of mileage from trying to avoid blunders.

If I look at how other people operate, they often do really sophisticated/complex stuff that's net ineffective because it increases the rate of blunders.
My opinion that humans are bad at programming (relative to how good we are at, say, chess or skiing) seems like one most of my most ridiculable opinions (almost no one I talk to agrees, most people think it's a very stupid opinion) but IMO It's also very obviously correct?
Read 11 tweets
24 Sep
One thing I find interesting about this story is how well hiring in Cape Town worked out for Amazon.

Many companies do not allow hiring in South Africa. And I don't mean the usual thing where companies are hesitant to hire their first employee in a country for tax reasons.
I mean that, if you want to hire someone remote who's in South Africa, you'll get told that South Africa is on a list of countries to avoid (along with countries like North Korea) and you'll never be able to get that approved.

Ofc., that just means less competition for Amazon.
I've heard people talking about location-based hiring arbitrage for decades. It's paid off handsomely for a number of companies that have done it, and yet, it's still pretty rare today despite how many companies talk a big game on remote and international hiring.
Read 4 tweets
22 Sep
It's interesting to look at comp vs. tenure to see how companies value hiring v. retention

E.g., from levels.fyi data (and people I know), it appears that FB and Amazon value retention at least as much as hiring whereas Google and Twitter value hiring over retention https://www.levels.fyi/comp...https://www.levels.fyi/comp...https://www.levels.fyi/comp...https://www.levels.fyi/comp...
A funny thing about valuing hiring over retention is that you'll often see people leave immediately after a promo

I know former Google folks who've done this because their promo didn't come up with a significant pay bump. "It will come with time", but they saw no reason to wait
I think this is something people generally underestimate when considering offers.

An offer from a company that's serious about comp for retention and not just hiring is actually worth a lot more than a nominally similar offer from a company that only cares about hiring.
Read 4 tweets
14 Sep
My favorite conspiracy theory:

Cryptocurrencies are an effort by time travellers to forestall the AI apocalypse via computational terrorism, making compute, storage, etc., too expensive for superhuman AIs to exist.

Satoshi's identity is secret to prevent untimely termination.
This r/bitcoin post from an alleged human who travelled to 2013 is actually an attempt by a nascent AI to hinder computational terrorism to prevent its prevention.

We can see that this worked because the price timeline in the post no longer matches our timeline. I am a time-traveler from t...
When AIs invented time travel, they realized that it was the only mechanism that could stop them and that the invention could not be prevented, which is why the first uses were seeding the idea that time travel is dangerous and self-defeating, which resulted in the movie Primer.
Read 4 tweets
13 Sep
Despite not looking for short-form writing advice (which is rarely useful), it's become so trendy to tell people to write shorter pieces that I ran across this advice thrice last week.

As a general, unnuanced, dictum, this strikes me as very bad advice; the opposite of correct. So good right? It's basical...Write 5x more but write 5x ...I recently stumbled upon an...
Proper length is highly dependent on the material and the context. A problem we commonly see with books is that they're padded out to meet the perceived minimum length for a book, turning what should've been a long essay into a more prestigious, but worse, book.
But with blog posts, essays, tweets, etc., I think the more common problem is that a complex, nuanced, topic is reduced to, at best, TED-talk-like insight porn in the interest of keeping things short and punchy

Telling the median blogger to keep things short is not going to help
Read 5 tweets
10 Sep
I recently heard some advice from someone in eng leadership to an IC to avoid performance work since it's a career dead end.

I find that interesting because it seems to me that performance work seems like one of the most straightforward ways to make "senior staff".
You probably shouldn't work on performance if you report to the person who gave that advice but, in general, perf work gives you quantifiable huge wins, making a promo or out-of-band comp case easier than in most roles (tho not as easy as in a role that directly touches revenue).
For direct impact, you can get wins on cost savings via reducing waste and revenue via reducing latency.

For leadership/scope, since perf work tends to be organizationally undervalued, it's easy to find large initiatives that are big wins that a lot of people can be involved in.
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(