I was in the gym this morning (at one point I will write a whole post on a good exercise routine for those of you who are curious) and I was just about to finish the bench press. As I place the bar back up on the rack I realized that I probably had a little more in me, but I lacked the aid of a spotter who could provide me with a bit of incentive/support in the event that I would not be able to get another rep out.
This got me thinking about the term spotting. Here are a couple of quotes about spotting taking from the wikipedia definition:
"Spotting, in weight or resistance training, is the act of supporting another person during a particular exercise, with an emphasis on allowing the participant to lift or push more than he could normally do safely."
Correct spotting involves knowing when to assist with a lift and encouraging a training partner to push beyond the point in which they would normally 'rack' (return the weight to its stationary position) the weight....."
This actually got me thinking about the pair programming process and the concept of being a spotter in the software development realm. When two people are actively pairing on a problem there is usually only 1 person who is typing while the other person is observing and conversing with the person doing the driver. The person not typing is not there in a passive or static role. They are
"actively supporting another person during the programming exercise"
They will be:
Catching potential design flaws the person driving may be missing
Providing ideas to a "driver" who may be stuck without an idea of how to go forward
Positively criticizing code choices that will result in a maintenance issue a couple of minutes from now (compounded if you add 6 months on top of that). Things such as cryptic variable names, class names that do not fit with the domain or problem space being tackled, long methods...
Taking the weight (keyboard) from the person entirely if they are completely unable to move forward
I think the last sentence in the wikipedia description is interesting:
"As a general rule to prevent injury and ensure safety spotters should have the strength to be able to control the weight should their training partner's strength completely fail. This is known as a "bail out"."
When two programmers who are at a similar skill level get together to pair program a design problem, it provides a lot of stimulation, challenge, and idea bouncing that may not have happened had there been significant gaps in the skill level between the 2 developers. It also provides the added benefit of the "bail out" when the person driving the problem out in code gets stuck and they fail to keep moving forward, they can pass of the reigns to their pair while they regain their mental composure to tackle the problem once more.
Most of us know that it is a bad idea to attempt a heavy bench press without the aid of someone to spot us. In the same way, when you are facing down a particularly difficult challenge would you not prefer to have a spotter to aid you through the process?
Develop With Passion!!