One major flaw with comparing programmers to doctors and lawyers is that there's no acknowledgement of liability. It is far more often the case that a lousy lawyer or doctor puts lives at risk than it is a lousy programmer does, and liability is one of the most justified determinants for compensation.