If you've ever tried to recruit a truly great engineer, you've probably noticed something strange about the search. You start out thinking you're looking for someone in a pool of millions. After a few months you realize you keep running into the same names. The people you want have usually already worked with each other, or with someone you know, and you could fit all of them in a mid-sized conference hall.
My guess is that there are about 5,000 of them in the whole world. That sounds like a number I made up to sound dramatic, but there's a surprisingly old piece of math behind it.
In 1926 a statistician named Alfred Lotka looked at the publication records of chemists and physicists and found that output was wildly lopsided. The number of scientists who published n papers was roughly proportional to 1/n². Most published once or twice and were never heard from again, while a handful published constantly.
A few decades later Derek de Solla Price, a physicist turned historian of science, turned Lotka's curve into something you can do in your head. In his 1963 book Little Science, Big Science he was trying to describe what happens when science grows from a few people in labs into an industry, and he needed a rule of thumb for how the work was divided up. His answer was that half the papers in a field are written by the square root of the number of authors. If 100 people publish in a field, 10 of them write half of what gets published. This became known as Price's law, and though Price was writing about scientists, nothing in it depends on the work being science.
So how many people write software? Estimates range from about 20 million to 27 million, depending on who's counting and what they count as a developer. The square root of 27 million is about 5,200. The square root of 20 million is about 4,500. Either way you end up with a small town's worth of people doing half the work, and those are the people writing the compilers, kernels, databases, browsers, and frameworks the rest of us build on.
You could object that papers and software aren't the same thing. A paper has a clear author and you can count it. Software is written by teams, and the most valuable code is often not the code there's the most of. That's true, but I think it cuts the other way. If you measure by what other programs depend on, rather than by lines written, software looks more lopsided than science, not less. Look at the commit history of almost any important open source project and you'll see Lotka's curve, with a long tail of people who fixed a typo once and a few people who wrote the thing. And when bibliometricians went back and checked Price's law, they found that real fields are often more skewed than the square root predicts, so if anything 5,000 is a generous estimate.
I should be careful about what the number means, though. Price's law says the square root does half the work, not all of it. The other 27 million people aren't doing nothing. They're the ones who take what the 5,000 build and turn it into products, and most of the software anyone actually uses was written by them. So the claim is narrower than "only 5,000 engineers matter." What it says is that half of the foundation rests on a group small enough that you could learn all their names.
What I find most interesting about Price's law is what it says about growth. The elite grows as the square root of the field. If the number of programmers quadruples, the number of people doing half the work only doubles. So as software gets bigger, it gets more lopsided. In a field of 10,000 people, the top hundred are 1% of the field. In a field of 27 million, the top 5,000 are about 0.02%.
That matters right now, because we're in the middle of a big increase in the number of people who write software, or at least cause it to be written. If AI turns hundreds of millions of people into some kind of developer, Price's law predicts the group at the top gets bigger, but much more slowly than the crowd around it. Which means the elite will be an even smaller fraction of the field in ten years than it is now, however good the tools get.
It also explains why recruiting these people feels the way it does. When the group you're looking for is 0.02% of the population, the usual methods stop working. Job postings don't reach them, because they're not looking. Resumes don't help, because what distinguishes them usually doesn't show up on one. What works is the thing that works in any very small community, which is finding them through each other. So when your search keeps turning up the same names, you're not doing it wrong. That's just what a group of 5,000 looks like from the inside.
And it's why, if you have one of these people on your team, you should probably do almost whatever it takes to keep them. There aren't many more where they came from, and Price's law says there won't be many more for a long time.

Hey! I'm Jared Palmer. I'm the VP of Engineering at Cognition, the applied AI lab behind Devin, focused on building the future of software engineering with AI.