So what do you do when the police stop you? I know what you shouldn't do:
Example: When a police officer attempts to speak with you, do not say "I'll be right with you" and attempt to walk away. They don't like that. My client got beaten up, partly because of this simple failure to recognize that that police officer, at that moment, was the most important person in his life. He also got charged with DWI when he wasn't intoxicated, and charged with the felony of assaulting a police officer, on a night when no one from the DA's office was available, meaning he spent about 20 hours in jail before I was able to get him out. I had to spend 11 hours of time (from 2 am to 1 pm on a Saturday) to deal with this.
The short answer is, you should be polite to the police officer. This may be hard to accept, but most police officers are generally decent human beings. They also have difficult jobs. They often have to deal with unpleasant people, and occasionally they face very real danger in their work.
I mentioned that they're human beings. That means they're imperfect. And here's the key, as I see it.
In that first moment (maybe 5-10 seconds) of your encounter with that police officer, he or she will decide whether you are one of the good people or one of the bad people. If you are polite, and show your respect, the odds are you will be considered one of the good people. This does not mean you will necessarily get away with whatever you've done, but you are far less likely to get beaten and thrown in jail. If your offense was a close call (say 75 mph in a 65 mph zone), politeness may get you a "this is your lucky day sir", while rudeness might get you a ticket for something a bit worse than what you actually did. And it will be much harder for your lawyer to get you a deal later.
Just the other day I was in Court negotiating with a Trooper. My client did worse than usual because the Trooper felt he had been rude. He said something like: "Ordinarily I'd give you a better reduction, but this guy was an asshole".
Now at the same time I'm saying be polite, that doesn't mean you should tell everything.
Q: Do you know why I pulled you over?
A: No (you might have a guess, but you don't know)
A: I'm sorry officer, no I don't, but I'm sure you had a good reason. What did I do?
Q: Have you had anything to drink tonight?
A: No (even if you have -- you're not under oath and this would be an admission against interest)
or you might try:
A: I'm sorry officer, but my lawyer told me never to answer a question like that. (No is a better answer)
Q: Is it okay if we search your vehicle/house/apartment?
A: I'm sorry officer, but my lawyer told me never to consent to a search. (notice the polite "I'm sorry")
Q: Do you know what the speed limit is here?
A: No, but I've got a bad feeling I'm not going to like the answer (humor can help)
Q: Do you know how fast you were going?
A: No (you don't know your precise speed)
A: I'll have to assert my Fifth Amendment privilege on that one officer (I actually did this once - the humor did help, but you have to be lighthearted, not snide -- also, this was around the time Mark Fuhrman was saying that phrase, so that made it a little funnier)
One last thing - a judge told me this one. He said he carried a bottle of liquor in his glove compartment. His strategy was if he ever got pulled over after he'd had a few drinks, he'd get out of the car with the bottle, and in an obvious manner, open it and start drinking it.
Technically, this sounds like a good strategy - it's pretty hard for the police to get a good reading on your level of intoxication when you were driving because the demonstrative consumption messes up the testing.
I'd say this is a high-risk strategy, and it's probably only worthwhile when you're facing your 3rd or 4th DWI, in which case you probably are not going to plan ahead like this.
A far better strategy is to call a cab if there's any chance you might have had too much to drink.