This is also not mathematically true. You are assuming an even and symmetrical distribution of "better than average" and "worse than average" programmers, but the term "average" doesn't necessarily equal the median.
If you have a number of exceptionally-good programmers, but few exceptionally-bad programmers, the average will be raised to where over 50% of your programmer population is actually qualified as "below average", regardless of their opinions about their skill.
However, we must consider the dynamics of the programming industry. If someone is indeed a terrible programmer, they are likely to be driven out of the industry, either by their own choice or by management. On the other hand, the good programmers will usually be encouraged to stay. That puts a bias on the distribution, raising the average quality of programmers beyond the median quality of programmers.