Pilots and pair programming

In commercial airlines, captains and first officers split the flying duties equally. But historically, crashes have been far more likely to happen when the captain is in the “flying seat.” At first this seems to make no sense, since the captain is almost always the pilot with the most experience. … Planes are safer when the least experienced pilot is flying, because it means the second pilot isn’t going to be afraid to speak up.

The context of this excerpt is an examination of airplane crashes in which the copilot was aware of the pilot’s errors but did not speak up assertively.

I wonder whether an analogous result holds for pair programming. Do more bugs slip into the code when the more experienced programmer has the keyboard? The German aerospace company DLR thinks so. The company pairs junior and senior programmers. The junior programmer writes all the code while the senior programmer watches.

The new thing for pilots is CRM (Crew Resource Management) largely motivated by the number of accidents when the senior pilot was in charge. In the old culture the captain was more like a naval captain; his word was law, not to be questioned, and he knew best. So junior officers were hesitant to bring problems to his attention, sometimes with fatal results. From what I can tell it has been very successful at avoiding or mitigating accidents. The psychology of piloting an aircraft and training for unexpected problems is fascinating and surprising. There is a training psychology expert who is also an extremely accomplished glider pilot who has studied this quite well. He was an expert witness at an NTSB hearing about a recent fatal crash (I believe the one near Buffalo which was a total loss) and his testimony is fascinating, as is his work. I don’t recall the hearing or the professor’s name but if Google fails someone who is interested I could probably find the details pretty easily.

As regards the possible confounding of a senior pilot taking the wheelwhen the SHTF, I don’t think it is significant, but in almost all cases it could be studied pretty easily from flight data and cockpit voice redorders. In cases where the recorders failed, there is often recordings of conversations with air traffic control which could be investigated. But from looking at many significant air disasters, there is often no time for the pilot to take the wheel, and even when there is time if the junior officer is piloting, the captian will advise or command but not necessarily take control. A lot of these accidents are due to a lack or loss of situational awareness. Usually the pilot is unaware, and sometimes the other officer, engineer, or even flight attendants are aware of a possible problem. With the old culture, when the pilot is junior and the officer who notices something is the captain, the captain is expected to let him know. When the roles are reversed junior officers used to hesitate for fear of insubordinating the captain or on the assumption that the captain certainly must be aware of whatever he noticed. There are some cases where the junior officer mentions repeatedly to the captain piloting the aircraft that something seems wrong, but this is not acknowledged by the captain and the junior officer does not press the point.

So the type of disaster they are trying to avoid is when the captain is at the wheel, he is paying attention to some possible problem (bad weather, landing gear not indicating it is lowered, instrument problems) and does not notice a more serious problem (altitude too low, heading or attitude wrong, about to run into a mountain, mechanical problem) which the junior officer notices or suspects.

One reason they focus on this kind of accident is that many seem to be completely avoidable if the crew resources would have been properly managed. Accidents due to sudden mechanical failures and the like are best prevented by proper aircraft design and maintenance, and from that sense often the crew can do little or nothing about them. Statistically the mechanical failures shoudl happen more or less independently of who the pilot is, whereas the identity of the pilot has quite a bit to do with how information is shared. Or at least it used to.