Any person who is charged with an offense against any of the provisions of this Code or any ordinance of the city shall be informed by summons in writing served on him of the nature and cause of the accusation; shall have compulsory process for obtaining witnesses in his behalf; shall have a speedy trial; shall be confronted with the witnesses against him; and shall have the privilege of cross-examination as in the superior courts of this state. The same rules as to examination of witnesses and the evidence adduced as obtained in such court, as far as they are applicable to cases before the municipal court. The person accused shall have the privilege of defending himself, by counsel or by himself, or both, whichever shall seem proper to him. No one shall be condemned, fined or punished without a chance of being heard in his defense.