McCane played this well. He's also a moron.
He's losing to a young, idealistic, inexperienced man who's the first black presidental canidate, one that has roots with the working class, plus he knows that there's lots of women who wanted to vote for Hillary but are uncertain about Obama, so what does he do? He picks a young, idealistic, inexperienced woman, who's the first woman to run Veep, and has roots with the working class (her husband). She's like the white female Republican version of Obama.
So I'd be saying that McCane picked his running mate well. But there's one problem. He tried to go a little too far in outdoing Obama, and picked someone with even less experience than he has! What kind of foreign policy do you have to worry about in the backwoods of Alaska? Russian tartars crossing over the Bering Strait? A missile defense shield across the coast?