In addition to all this… my personal method of never losing personally a moving violation case in court… (Won 3 times as a twenty something, and once at 45, once helped my mom beat a ticket, as well).
Do your best to make the stop as quick and unremarkable as possible, without admiting guilt or providing additional probable cause… (ie. Follow the instructions/suggestions in the article/comments here).
If you get a citation, once you drive away: at your earliest chance, pull over somewhere and take a few brief notes (written or audio) about the facts you would use to contest the ticket.
Many police will actually do the same about you, writing notes on the back of their copy of the ticket, which gets filed/kept…
especially if you seemed by speech or behavior, to indicate when given the ticket that you might contest it.
When you receive your court date, reschedule it a few times, to put as much time between the citation date and your court date. Make it very hard for the officer to recall anything except what’s written on the ticket.
Request a copy of the original ticket, and specify you want both the front, back and any additional notes the cop wrote. You have a right to this, and they will provide it. You see exactly what the cop wrote after your stop, which is almost exclusively what they will use in their testimony; and you can prepare to counter effectively.
Also, the cop knows you asked for this, and it seems many decide it’s not worth showing up to court against someone who’s well prepared.
If you can, attend a ½ hr of court ahead of your date; to see how it really goes down. It’s entertaining and eye opening to see how cops testify and the various gotchas.
At your court date, it seems like at least 1/3 of officers don’t show up; if so, your case is dismissed. I’m 5/5 using the above, all times cop was a no show.