Favorite technique.
Before he even gets to your car, have your car off, both hands on the wheel and license, registration & insurance in your hand.
Always respond with "Yes sir."
When he/she asks if you know why you were pulled over, "Yes sir, I was going a little quick." or "Yes sir, I rolled past that stop sign, I apologize."
Most of the time, if you treat cops w/ respect, and you make them feel like they have complete control of you and the situation, they'll let it ride.