How I Approach First Principles Thinking

swyx - Mar 1 '20 - - Dev Community

An expanded version of this essay is available in my book.

In a recent conversation I had with someone I admire, they commented that they really liked my way of explaining things from first principles. I was quite struck by this in 3 ways:

  1. I wasn't actually consciously doing it
  2. It explained things I did well
  3. That they noticed and valued it

I think it is worth introspecting on why First Principles Thinking works and how to do it, so I can consciously try to do it better.

First Principles Thinking

First Principles Thinking (FPT) is starting from unequivocal base facts and building up toward some vision or explanation of reality. It involves reasoning by deduction rather than by analogy or appeal to authority. It's been called the Dumbest Thing Smart People Do.

Ironically, plenty of explainers (1, 2, 3) on FPT immediately appeal to authority like Naval or Charlie Munger or Elon Musk. Elon probably has done the most to popularize it in recent memory, but if you must be sold on basis of authority then you haven't really got the point of FPT.

To embrace FPT, you need to understand the philosophy of logic and epistemology.

Logic

Logic is the analysis and appraisal of arguments.

I first encountered this via a philosophy lecturer I had in junior college, Lionel Barnard (who was actually supposed to teach Economics, but preferred to turn our class into a little PPE program for our intellectual gratification). In particular I have always favored the format of Syllogism, which takes a form like this:

  • 1. All men are mortal.
  • 2. All Greeks are men.
  • ∴ All Greeks are mortal.

That symbol denotes a logical and inevitable-to-the-point-of-truism consequence of the first two propositions. This underlies a lot of how proofs are done in Math, and the other basic sciences - take N facts, put them together, derive a new, more useful fact that is as real as those other facts.

You can't get very far if you only rely on facts, though, because there are many more unknowns and indeterminate or stochastic processes than there are facts. So you can supplant your syllogisms with Axioms - assumptions that you take to be true. You don't HAVE to prove them true, but you can show by deduction that given an acknowledged set of assumptions, you can arrive at a logically sound conclusion. This is FANTASTIC, because it lets you enumerate your beliefs, and allows you to change your mind instantly if your assumptions are proven wrong (especially handy because you can't prove a negative).

So that's great - who would argue against Logic?

It turns out that logical deduction has limits, and in fact takes a lot more effort (in corralling facts - sometimes your facts are actually lies, hence the reproducability crisis - and validating the integrity of the logical chain of arguments), and by far the more prevalent method we operate on is Induction. We study this in Epistemology.

Epistemology

Definition: The study of the nature of knowledge, justification, and the rationality of belief.

Epistemology (pardon the jargon) address the question of how we know what we think we know.

Side note: Apologies in advance to readers who actually have studied philosophy if I mangle things!

There are many approaches to the study of Certainty so I will blithely ignore most of them and contrast two: Induction vs Deduction.

Sept 2020 Update: Cedric Chin via Commoncog has fleshed out two more very interesting approaches - particularly Pragmatism, which is super counter-intuitive!

I have already presented deductive reasoning above - given a base set of general facts, we build up as high as we can to useful general conclusions.

Inductive reasoning is the opposite - taking specific real world observations and generalizing them to general truths. This is problematic in SO many ways, and we have known this for hundreds of years, but yet this is how most of us conduct our businesses, lives, and core belief systems.

This is how insidiously persuasive induction is:

  • You may laugh at someone taking a single anecdote and generalizing it to everybody.
  • But this is philosophically only slightly worse than taking a population survey and generalizing...
  • which is again only slightly worse than looking outward and seeing what else exists and inferring that that is all that can exist (the proverbial frog in the well).

We do this every day.

We dress induction up in statistics and numbers to make it feel more truthy. We call ourselves things like empirical or data-driven. We look at someone's resume for assessing capability to do a job - unobjectionable at first glance, until you see how much people's opinion changes when "A went to Harvard" or "B was the guy who took X from 10-100m in ARR", implicitly projecting that that transfers. When hiring for a thing (say, a job in React) we overweight people who have done the thing (a previous job in React) over people who could do the thing (anyone with extensive experience in JavaScript/webdev). We keep up on news and trends and competitors and neighbors and peers and celebrities and friends and family and that represents our reality. And rarely question its nature and limits.

Induction and Deduction are not on equal footing. As a rule, induction datapoints are far more readily available, while deductive facts are far more timeless yet costly to pin down. Humans are GREAT at backfitting/rationalizing from present datapoints, but terrible at examining the basis of their beliefs.

Sorry... can you tell I feel strongly about this? 😅

Addressing your Epistemology head-on is supremely important for decision-making - because if you don't know how you know what you know then how do you have any faith in the decisions you make based on that knowledge?

But it is also important tool for explaining mental models - because you can either fill your explanations with a bunch of incidental junk complexity, or you can start from a bunch of irrefutable base facts and build up to something more significant in its presentation.

If you aren't impressed by this and think this is all faffy mumbo jumbo, let me put it to you this way:

You are being illogical when you reason by deduction. That's fine, so long as you know it. The danger is when you can't imagine what you don't know, and get offended or take action to deny or obstruct the pursuit of truth.

Applications

My talk on Getting Closure on Hooks was cited as a "First Principles" talk, as is the followup on Concurrent React. I think all talks and blogposts in the From Scratch genre, like this on React Router or this on Redux or this on the hardware-software interface is great First Principles fodder. There's even an entire repo on GitHub for Build Your Own X projects!

But of course, First Principles can be applied far beyond code. A good general set of first principles for any system is now in vogue as Systems Thinking, quoting Donella Meadows:

PLACES TO INTERVENE IN A SYSTEM
(in increasing order of effectiveness)

12. Constants, parameters, numbers (such as subsidies, taxes, standards).
11. The sizes of buffers and other stabilizing stocks, relative to their flows.
10. The structure of material stocks and flows (such as transport networks, population age structures).
9. The lengths of delays, relative to the rate of system change.
8. The strength of negative feedback loops, relative to the impacts they are trying to correct against.
7. The gain around driving positive feedback loops.
6. The structure of information flows (who does and does not have access to information).
5. The rules of the system (such as incentives, punishments, constraints).
4. The power to add, change, evolve, or self-organize system structure.
3. The goals of the system.
2. The mindset or paradigm out of which the system — its goals, structure, rules, delays, parameters — arises.
1. The power to transcend paradigms.
Enter fullscreen mode Exit fullscreen mode

I have in my head a set of other questions I also like asking:

  • What do people really want? Usually it is something simple, but not easy. Maslow's Hierarchy is a good reference, as is the list of Things You Can't Buy:
    • Freedom
    • Time
    • Health
    • Wealth
    • Family
    • Purpose
  • What are the physical limits? For example, the speed of light, but also you can do thought experiments on the limits of Moore's Law vs Wirth's Law or use Big O notation to model scaling factors of Personal Growth
  • What are the units of output? Related to systems thinking, but this is a reductive method that has been very helpful in taking the hype out of tech startups and reducing Uber and AirBnb to driver miles and room nights.
  • What is your success metric? How do you know if you succeeded? Starting with the End in Mind is a good habit for productivity but Christine Yen likes to ask this to help guide what we should do
  • Who cares? Don Valentine's cryptic two word test on who the end customer really is and how much they care.
  • What are the rules of the game, and how are they changing? When you play any game, you first find out the current rules for winning, but you must also find out how the rules are changing in order to win in future. This is also called Game vs Metagame.

Further Reading

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .