I've lately been thinking about more things that the military do that is either something agile teams typically do or something agile teams can learn from. So one thing I've been missing in my day to day work lately is how I, as a platoon commander, worked with my platoon sergeant (i.e. the person second in command in the platoon). As platoon commander I gave orders for some activity and the platoon sergeant then lead the work and sorted out all the details while I planed our next activity. When in combat me and my platoon sergeant worked a little different. In combat the platoon commander leads the main force focusing on the most important target. The platoon sergeant leads any supporting missions such as outflanks or suppressive fire to support the main force. This type of cooperation is not seen at platoon level only. The same type of cooperation between the two commanders are seen from squad level all the way up to the supreme commander.

The same type of cooperation I experienced in the military is what I see when I do pair programming. The only difference is that there is no commander. The commander role switches all the time. There is two ways to see this. Either the person at the keyboard is the platoon sergeant carrying out the last order (i.e. making a failing test pass or refactoring). In the mean time the person not at the keyboard is thinking about the next step. Or the person at the keyboard is leading the most important part of the mission (making a failing test pass or refactoring) while the platoon sergeant next to him do supportive tasks.

Either way you look at it the way a squad, platoon or company is lead by its commanders is very similar to how pair programming works. And if that is very similar then we should be able to compare how things work when you're not doing pair programming. If I lost my platoon sergeant and did not appoint a new one my work as a platoon commander became much more cumbersome and less fun. Also I tended to make more mistakes and wrong decisions when I did not have my platoon sergeant to help me out with practical things nor having him as somebody to discuss possible solutions with. And I think the same applies to not doing pair programming. You tend to make worse design decisions and more mistakes if you sit by your self all day. Naturally you can get some of the synergies without pair programming if you make sure you discuss all design decisions with somebody. But pair programming will give it to you auto-magically in both big and small decisions.