It's fairly well recognized that some programmers are up to 10 times more productive than others. Joel mentions this topic  on his blog. There is a whole blog devoted to the idea of the " 10x productive programmer ".
In years since the original study, the general finding that "There are order-of-magnitude differences among programmers" has been confirmed by many other studies of professional programmers (Curtis 1981, Mills 1983, DeMarco and Lister 1985, Curtis et al. 1986, Card 1987, Boehm and Papaccio 1988, Valett and McGarry 1989, Boehm et al 2000).
Fred Brooks mentions the wide range in the quality of designers in his " No Silver Bullet " article,
The differences are not minor--they are rather like the differences between Salieri and Mozart. Study after study shows that the very best designers produce structures that are faster, smaller, simpler, cleaner, and produced with less effort. The differences between the great and the average approach an order of magnitude.
The study that Brooks cites is:
H. Sackman, W.J. Erikson, and E.E. Grant, "Exploratory Experimental Studies Comparing Online and Offline Programming Performance," Communications of the ACM, Vol. 11, No. 1 (January 1968), pp. 3-11.
The way programmers are paid by employers these days makes it almost impossible to pay the great programmers a large multiple of what the entry-level salary is. When the starting salary for a just-graduated entry-level programmer, we'll call him Asok (From Dilbert), is $40K, even if the top programmer, we'll call him Linus, makes $120K that is only a multiple of 3. I'd be willing to be that Linus does much more than 3 times what Asok does, so why wouldn't we expect him to get paid more as well?
Here is a quote from Stroustrup:
"The companies are complaining because they are hurting. They can't produce quality products as cheaply, as reliably, and as quickly as they would like. They correctly see a shortage of good developers as a part of the problem. What they generally don't see is that inserting a good developer into a culture designed to constrain semi-skilled programmers from doing harm is pointless because the rules/culture will constrain the new developer from doing anything significantly new and better."
Paul Graham has an essay on wealth  that really covers the same ground. It comes down to measurement and leverage. Even though it is hard to measure, it still exists. Paul even advocates a higher multiple than 10.
Like all back-of-the-envelope calculations, this one has a lot of wiggle room. I wouldn't try to defend the actual numbers. But I stand by the structure of the calculation. I'm not claiming the multiplier is precisely 36, but it is certainly more than 10, and probably rarely as high as 100.
Here are some other areas in which talent/ability affects pay.
Factors that restrict programmers from becoming 'rock stars':
This leads to two questions. I'm excluding self-employed programmers and contractors. If you disagree that's fine but please include your rationale. It might be that the self-employed or contract programmers are where you find the top-10 earners, but please provide a explanation/story/rationale along with any anecdotes.
Why aren't the top 1% of programmers paid like A-list movie stars?
What would the industry be like if we did pay the "Smart and gets things done" programmers 6, 8, or 10 times what an intern makes?
[Footnote: I posted this question after submitting it to the Stackoverflow podcast. It was included in episode 77  and I've written more about it as a Codewright's Tale post ' Of Rockstars and Bricklayers ']
It's unfair to exclude contractors and the self-employed. One aspect of the highest earners in other fields is that they are free-agents. The competition for their skills is what drives up their earning power. This means they can not be interchangeable or otherwise treated as a plug-and-play resource. I liked the example in one answer of a major league baseball team trying to field two first-basemen. That example also highlights the need for a standard playing field. When a baseball player is traded between teams he doesn't need to learn a new set of rules (the DH rules don't count as a whole new set). Imagine if each team had their own set of rules that were used for their home games.
Also, something that Joel mentioned in the Stackoverflow podcast (#77). There are natural dynamics to shrink any extreme performance/pay ranges between the highs and lows. One is the peer pressure of organizations to pay within a given range, another is the likelyhood that the high performer will realize their undercompensation and seek greener pastures.
Companies are not set up to reward people who want to do this. You can't go to your boss and say, I'd like to start working ten times as hard, so will you please pay me ten times as much? For one thing, the official fiction is that you are already working as hard as you can. But a more serious problem is that the company has no way of measuring the value of your work.
As an aside, it might it might help explain why companies are so willing to pay outside consultants exorbitant rates. Working as a contractor is evidence, not quite proof, that they produce more than an employee; by being more talented, more driven, etc.
It might be time to start moving some of this material into an answer. Paul's essay really crystallized the issues for me.
Okay, this isn't going to be popular. Umm. Anyway...
You're using the wrong metric. Productivity or its lack has nothing to do with pay.
How much you are paid is proportional to how much money you can prove you make the company.
This is why sales people are paid more: it's easy to prove that some sales is greater than no sales.
This is why movie stars make more: a movie with a name can be proven to make more than a movie with a nobody.
How many programmers can prove to management, using the only language business knows (money), that they have increased income 10X over their least skilled compatriot?
It's fairly well recognized that some programmers are up to 10 times more productive than others.
First of all, we can't measure productivity well enough to know what the average is or if it's a 2X, 3X, or 10X gap between the best and the average.
Second of all, that statement is often repeated, usually with the thought that "I'm one of the outliers and the rest of you are average", but rarely is it accompanied by evidence.
Third, the people who are really making out, like Page and Brin, start companies. They aren't heads down coders.
Fourth, programming salaries are subject to the rules of the marketplace just like everything else. If salaries are lower than you think they should be, perhaps it's because of market forces (e.g., easily available developers in India, Singapore, Russia, etc.) that are bringing the average down.
This answer might get me a down vote or two (or twenty) but take an economics course and figure it out. Maybe you aren't making A-list money because you believe too much of what you read on the Internet and don't take enough interest in skills other than coding.
Sorry, I'm standing by my statement.
Steve McConnell's most compelling story - 80 Boeing developers replaced by one person - is accompanied by an "I'm not sure that it's true" disclaimer.
All the academic, controlled experiment studies that are cited still use lines of code or other obviously flawed measures for productivity.
Anything cited early than 1995 should be thrown out. I would weight a study that doesn't even use a modern language, tools, or techniques a lot less.
They also ignore one crucial fact: Programming in the large is a team sport, not an individual one. Tell one of your teammates that you make 10X the money they do and see how eager they are to cooperate next time you need their help.
Honestly, the economics answer is the only thing that's correct. The market decides. I don't know why sports and movie stars make so much money compared to bricklayers or ballet dancers. But they do. Supply and demand may not always conform to our sense of justice, but that's what is driving it.
1) Why aren't the top 1% of programmers paid like A-list movie stars?
At the risk of sounding snarky, I suspect programmers are not paid like this, because they are simply not like A-list movie stars, for the most part.
Most programmers (or, if you will, software engineers... there's a subtle difference) sit well behind the scenes, staring off into space, thinking carefully about the problem they want to solve, and then writing code to solve the problem. The average Joe-Schmoe will never see this person, and this person probably won't draw a tremendous amount of attention to himself (or herself). By way of demonstration, consider a lead developer for any version of Microsoft Office, and tell me if you could even think of a name, let alone visualize a face, without having to perform a Google search.
People like Linus Torvalds or Bjarne Stroustrup are notable exceptions.
A-list movie stars, by contrast, have a kind of built-in publicity by the nature of their work. Everyone sees these people, and when a movie hits it big, tons of people get to see the figure of that person doing what that person does best. When you watch Joe and the Volcano, you see Tom Hanks, and associate his acting (good or bad) with that character.
2) What would the industry be like if we did pay the "Smart and gets things done" programmers 6, 8, or 10 times what an intern makes?
Either software would be so outrageously expensive that nobody could afford to purchase it (and, thus, the whole industry would implode on itself), or interns would find themselves paid so poorly they would learn their craft quite slowly, or never pursue it, for having to supplement their income in some other fashion.
I don't think the market could bear it.
On the other hand, I tend to think a lot of companies hire more developers than they need to accomplish their goals, so it's hard to say; maybe one could afford to hire really good programmers at the rate you suggest if one hired fewer programmers overall.
There's fundamentally three reasons.
First, programmers aren't going to make superstar salaries, because you can bunch them up. You can substitute a couple of 7s for one 10. On the other hand, you can't play two decent players at first base in baseball, rather than one excellent player, and you can't put two good actors into one role instead of one great actor.
Second, corporate salary structures tend to be flatter inside categories than productivity would suggest. Therefore, there will be a lot of resistance to paying one person ten times as much as another for the same job, even if perfectly justified on the basis of productivity.
Third, it's very hard to measure productivity. The tests I've read about are basically about completing set tasks within certain periods of time, and one mark of a good developer is selecting the individual tasks better. Measuring productivity in the office setting is very difficult or impossible to do halfway accurately, and paying widely different salaries on an inaccurate measurement is going to have its own set of problems.
These last two mean that the only way an exceptionally productive developer is going to earn what he or she is worth is to be involved in the business, either starting a company or at least being in profit sharing. That requires doing different things and having different skills. Bill Gates is undoubtedly a quite talented programmer, but what got him his billions was his ability to run a business from nothing to something the size of Microsoft, which is a very rare ability.
To have a superstar phenomenon, you must have two conditions:
Movie stars like Johnny Depp fit into both categories. You might argue that programmers can fit into the first category but I'd argue there are more exceptional programmers than top-of-the-line actors. And, at your regular company, programmers don't fit into the 2nd category. Their work influences at most everybody in the company.
Compensation is just the price for labor.
Prices are set by supply and demand.
Companies who want someone good need only raise what they are willing to pay until they can attract the necessary number of high-power developers. The amount is only partly correlated to productivity, as that does affect the demand side of the equation. If a good developer got tens times as much work done then a company could conceivably find motivation to pay ten times as much, but there is no point as long as paying a lesser amount will attract the right candidate.
The situation is complicated by incomplete information. Interviews are terrible ways to select programmers and not everyone has figured that out. With incomplete information the company does not know how much to pay.
It's easy to understand if restated to something less personal. Suppose computer B is ten times faster than A. Does that mean B should cost ten times as much. No. Sometimes it's very expensive to live on the fringe, and it costs more than 10 times as much. But suppose competitors can duplicate the 10x performance increase at only twice the price of A. This will obviously limit the price of B on the supply side.
Now imagine that it isn't clear, at least at first, which computer is even the faster one. This will also tend to even-out the pricing variation.
By excluding self-employed and contractors, what percentage is of all programmers are you excluding? In a sense, I get the feeling like if we didn't count any North American football players in the NFL, CFL or college level, how good are the top players left? By making that pair of exclusions I'm taking out a good chunk of the top players.
How do you know that the top programmers at companies like Microsoft and Google aren't making rather large sums of cash? I'm not dodging the question as much as just asking how well can the answer be known as most companies guard salary information as tightly as intellectual property, IME. Consultants can sometimes make a lot of money but I'm not sure their salary is part of public record. There is also a point where I think more money isn't what people seek in their profession as things like time off and other benefits are more important than making more money.
I wonder if places like Thoughtworks  may be an example of where some people are paid the big bucks if their skill set merits such a level of compensation. Don't forget that there is also the question of what there is in compensation beyond a straight salary, like stock options, vacation pay, and bonuses for example. Jean-Paul Boodhoo  would strike me as an example of someone that could get an amazing amount of work done in an hour compared to most other developers, based on the few talks where I've seen him in action.
I am not sure that compensating by productivity is so practical. For instance, I would rather see a developer who (if the timeline allows) may take longer but write something reusable with little technical debt that can be used and changed in the future. If we got measured by how fast we get the next short-term task done, when would we refactor? Why would we test? Tying compensation to short-term goals is how the economy got to this point. It would reverse positive trends in software development like testing by developers, since they can get more stuff and make bugs "a QA problem".
Now I would certainly love to be getting paid a lot more (especially considering education and such) rather than slightly above market.
However, I have come to accept the fact that unless you get to the upper echelons, developers who actually write code and have most of their experience in standard technologies rather than some unique, obscure, or extinct one, are simply a market commodity. There are too many of us, and the techniques for measuring our quality or contribution or talent are simply not there. At best, we could have come from a "top company" or a "top school". There could be companies like Fog Creek who actively hunt for superstars. But for the vast majority of companies, we are a commodity.
Companies are businesses, businesses are run by execs who control compensations, and execs only know how to poach and pay a lot to other execs, not technical people. That's because the people who can best evaluate technical talent are the technical people, which are merely means to an end for most of the execs. That's because most execs are one golf outing away from outsourcing our jobs and hiring some fancy consultant with "experience to manage an offshore team".
Anybody who is in this profession for the money in the US is in trouble. Anybody who expects to be reliably compensated for his talent in this profession is also probably in trouble. We could have used our talents to go to Law, Business, or Medical school; I believe many of us could have made it in. I'd like to think that most of us made the choice to not do so.
Here's just a couple of ideas supporting the question:
Is the programming situation any different than any other engineering field? Technical fields in general (for example, research Ph.d in organic chemistry)? Employment in general?
There are a lot of references to the "market". My understanding is that market models fail when the consumers cannot differentiate quality in the offered goods. So, does the issue reduce to the difficulty in measuring quality, is the measurement just a major factor or minor factor, or is measurement unimportant? (i.e., "even if you could measure...make no difference...")
An echo of SWEBOK... What are the factors involved in measuring a programmer's value, and what proportion does productivity play? e.g., Y is very (20x) productive, but has x complaints of sexual harassment; insulted customer's wife, resulting in loss of contract; hygiene issues negatively affect productivity of coworkers; ad nauseam.
Assume that the employer views the engineering staff cost as it would any other commodity. (I think) it follows that the company will attempt to contain staff costs as it would any other costs. I guess cost management is a complicated field, and I don't know much about it, but if we budget $50K for an addition to the programming staff, the recruiters will look for the best we can get for no more than 50K, and if given a choice between a 37K and 49K who look the same, will pick the 37K every time. Again the measurement issue. If the 49K would be 10x as productive as the 37K, but the 37K works out OK, was the 37K the wrong choice? (Hint: these is no line item for retained staff productivity as an asset)
See my answer about developer salaries to rise or fall; the key is the market for lemons.
Software Engineering ( requirement is more than programming... for reasons that should be obvious as the argument progresses)
In a LEMON market, you don't know when you hire how good they are. They normally stay 2 years. They many not even know themselves how good they are; the Dunning–Kruger effect and second order ignorance will play merry hell here.
You will only know how bad or good the work was in about 3-4 years, because that's how long a project of a decent size runs for. So you MIGHT find out long after they leave. If you were capable of telling the difference after the fact.
The Lemon market ( originally used cars) is about asymmetric information. The car seller is presumed to have a pretty good idea what a dud the car is, the buyer has no idea. So you have to assume it is a lemon. This pushes really good sellers out of the market; they have to find some other way of shifting their valuable product. The problem in software is that maybe nobody involved knows that the work was bad or good.
How will we know this "above average developer"?
We may not find out if they are spending 80% of their time doing maintenance (like me!) If you have to fix bad code all day, it may be very difficult to shine -- the 10x programmers dropped to only 2.5x when locked down about development choices.
Your employer will try to pay you enough that you show up to work, but not so much that you retire at 40. If you belong to a profession with regulation like electricians, plumbers, doctors etc you can ensure that the pool of prospective competitors is smaller; all demanding higher pay. And the customer will just have to pay it. Professional Engineers (PE) who can sign off on work, and have professional liability insurance around Australia get paid maybe 0-$5k more than non-PE's. Mostly 0 more; so it's not worth it even for mechanical engineers. Being in a regulated profession where all people have to deal You->Customers pays more than You->Business because the pool of customers is so much bigger; and less organized.
If businesses started having to pay big $$$ for software, then they sponsor political parties to open up "work visas" so that they can get cheaper labor from somewhere else, importantly labor that can't vote. They don't do that to lawyers, the lawyers are part of the "big end of town" already. Most 2nd and 1st world countries have work visas to keep programming salaries low. So now you have to compete with someone who wants enough money to eat and share a room. (It you're the person eating and sharing the room, brothers & sisters, I sympathize.)
And finally, to make a film takes 2-3 years. Then everyone sees the result. Rock stars publicly sell music. Programmers work at a desk somewhere. Maybe nothing ever comes of what you do. Even if you do insanely great work, is it a complete product that makes hundreds of millions of dollars profits? You'd get a big paycheck if you had an agent. Or are you one of fifty people doing insanely great work? You'll get free pizza and a pat on the back.
Lets face it, often software is not that profitable, especially once you add enough management to disperse blame. The credit will go to the a member of the executive caste if it was.
In the vast majority of companies I've worked for, management is unaware that such as a thing as a "good" or "bad" developer even exists. They all just sit in their box and sprinkle their fairy dust, and out comes code.
Rock star?? Treated like a rock star by the BUSINESS?? in my experience, devs are treated exactly like the officers treat the Irish in that Titanic movie. They sit down in the boilers with their strange little customs and do whatever they do, and if everything goes pear shaped the powers that be shut the doors and let them drown first.
No matter how good you are, it's very hard to go into a company and demand a salary that's more than any of their directors get.
A-list movie stars get agents to negotiate rate for them and ensure that the terms are entirely business-to-business. As soon as you walk into the door as a potential employee you lose that.
I don't know about the US, but in the UK I suspect the top paid 1% of programmers still get paid well over $120k. They do so by either starting companies and selling to the public (think Google) and by contracting/freelancing.
If you're after figures, about 10% of salaried programmers earn more than $120k and more than 75% of contractors earn more than $120k. Courtesy of ITJobsWatch.co.uk