I would of just paid the ticket. A judge won't give any just respect to any average citizen even if the official code is in hand. If you wanted to fight it, should of had a lawyer. Yea that's a bit much when you have the written law in hand and such a simple case, however its how the judicial system operates. Sucks in the courtroom that you're actually at the discretion of the judge and not written law.
Oh yea, and anytime the judge feels as if his time has been waisted....best believe court costs are yours to pay along with the maximum penalty/fine for the charge.
Big ups to being bold enough to fight it though....good luck......