# Hammers and Nails

_If all you have is a hammer, everything looks like a nail._

The most important idea I've blogged about so far is [Taking Ideas Seriously](https://radimentary.wordpress.com/2018/01/18/singularity-mindset/), which is itself a generalization of Zvi's [More Dakka](https://thezvi.wordpress.com/2017/12/02/more-dakka/). This post is an elaboration of how to fully integrate a new idea.

I draw a dichotomy between Hammers and Nails:

A _Hammer_ is someone who picks one strategy and uses it to solve as many problems as possible.

A _Nail_ is someone who picks one problem and tries all the strategies until it gets solved.

Human beings are generally Nails, fixating on one specific problem at a time and throwing their entire toolkit at it. A Nail gets good at solving important problems slowly and laboriously but can fail to recognize the power and generality of his tools.

Sometimes it's better to be a Hammer. Great advice is always a hammer: an organizing principle that works across many domains. To get the most mileage out of a single hammer, don't stop at using it to tackle your current pet problem. Use it everywhere. Ideas don't get worn down from use.

Regardless of which you are at a given moment, be systematic because [Choices are Bad](https://thezvi.wordpress.com/2017/07/22/choices-are-bad/).

Only a Few Tricks
-----------------

I am reminded of a classic [speech](http://alumni.media.mit.edu/~cahn/life/gian-carlo-rota-10-lessons.html#lecturing) of the mathematician [Gian-Carlo Rota](https://en.wikipedia.org/wiki/Gian-Carlo_Rota). His fifth point is to be a Hammer (emphasis mine):

> A long time ago an older and well known number theorist made some disparaging remarks about Paul Erdos' work. You admire contributions to mathematics as much as I do, and I felt annoyed when the older mathematician flatly and definitively stated that all of Erdos' work could be reduced to a few tricks which Erdos repeatedly relied on in his proofs. **What the number theorist did not realize is that other mathematicians, even the very best, also rely on a few tricks which they use over and over.** Take Hilbert. The second volume of Hilbert's collected papers contains Hilbert's papers in invariant theory. I have made a point of reading some of these papers with care. It is sad to note that some of Hilbert's beautiful results have been completely forgotten. But on reading the proofs of Hilbert's striking and deep theorems in invariant theory, it was surprising to verify that Hilbert's proofs relied on the same few tricks. Even Hilbert had only a few tricks!

The greatest mathematicians of all time created vast swathes of their work by applying a single precious technique to every problem they could find. My favorite book of mathematics is [The Probabilistic Method](https://www.amazon.com/Probabilistic-Method-Noga-Alon/dp/0470170204), by Alon and Spencer. It never ceases to amaze me that this same method applies to:

1.  (The [Erdős–Kac Theorem](https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Kac_theorem)) The number of distinct prime factors of a random integer between < refresh to render LaTeX > and < refresh to render LaTeX > behaves like a normal distribution with mean and variance < refresh to render LaTeX > .
2.  ([Heilbronn's Triangle Problem](https://en.wikipedia.org/wiki/Heilbronn_triangle_problem)) What is the maximum < refresh to render LaTeX > for which there exist < refresh to render LaTeX > points in the unit square, no three of which form a triangle with area less than < refresh to render LaTeX > ?
3.  (The [Erd](https://arxiv.org/pdf/1201.6529.pdf)[ő](https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Kac_theorem)[s-Rényi Phase Transition](https://arxiv.org/pdf/1201.6529.pdf)) A typical random graph where each edge exists with probability < refresh to render LaTeX > has connected components of size < refresh to render LaTeX > . A typical random graph where each edge exists with probability < refresh to render LaTeX > has a giant component of size linear in < refresh to render LaTeX > .

It's amusing to note that in the same speech, Rota expounded the benefits of being a Nail just two points later:

> Richard Feynman was fond of giving the following advice on how to be a genius. You have to keep a dozen of your favorite problems constantly present in your mind, although by and large they will lay in a dormant state. Every time you hear or read a new trick or a new result, test it against each of your twelve problems to see whether it helps. Every once in a while there will be a hit, and people will say: _"How did he do it? He must be a genius!"_

Both mindsets are vital.

To be a Nail is to study a single problem from every angle. It is often the case that each technique sheds light on only one side of the problem, and by [circumambulating](https://radimentary.wordpress.com/2018/01/15/circumambulation/) it via the application of many hammers at once, one corners the problem in a deep way. This remains true well past a problem's resolution - insight can continue to be drawn from it as other methods are applied and more satisfying proofs attained.

Usually even the failure of certain techniques sheds light on shape of the difficulty. One classic example of an enlightening failure is the consistent overcounting (by exactly a factor of two!) of primes by [sieve methods](https://en.wikipedia.org/wiki/Sieve_theory). This failure is so serious and unfixable that it has its own name: [the Parity Problem](https://terrytao.wordpress.com/2007/06/05/open-question-the-parity-problem-in-sieve-theory/).

Dually, to be a Hammer is to study a single _technique_ from every angle. In the case of the probabilistic method, a breadth of cheap applications were found immediately by simply systematically studying uniform random constructions. However, particularly adept Hammers like Erdős upgraded the basic method into a superweapon by steadfastly applying it to harder and harder problems. Variations of the Probabilistic Method like the [Lovász Local Lemma](https://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma), Shearer's entropy lemma, and the [Azuma-Hoeffding inequality](https://en.wikipedia.org/wiki/Azuma%27s_inequality) are now canon due to the persistence of Hammers.

Be Systematic
-------------

The upshot is not that Hammers are better than Nails. Rather, there is a place for both Hammers and Nails, and in particular both mindsets are far superior to the wishy-washy blind meandering that characterizes overwhelmed novices. There may be an endless supply of advice - even great advice - on the internet, and yet any given person should organize their life around systematically applying a few tricks or solving a few problems.

Taking an idea seriously is difficult and expensive. You'll have to tear down competing mental real estate and build a whole new palace for it. You'll have to field test it all over the place without getting [superstitious](https://www.lesserwrong.com/posts/M2g5zDEwwp2o8NriZ/improvement-without-superstition). You'll have to gently [titrate](https://en.wiktionary.org/wiki/titrate) for the amount you need until you have enough Dakka.

Therefore, be a Hammer and make that idea pay rent. Hell, [you're the president, the emperor, the king](https://www.youtube.com/watch?v=WZzLdF6JNdM). There's no rent control in your head! Get that idea for all its got.

Exercise for the reader: all things have their accustomed uses. Give me ten unaccustomed uses of your favorite instrumental rationality technique! (Bonus points for demonstrating [intent to kill](http://www.hpmor.com/chapter/16).)