Bring 2 things:
#1 Your Brain
Don't commute through trouble areas and avoid any punks you see up ahead by going around the block or threw an adjacent alley. Not looking like a target is good, but that it another step and look to be more trouble than it's worth, my scraggy appearance and military surplus "riding gear" seem to suffice. You best bet is to avoid the situation at all costs. Should you end up face to face with punk(s) your best option is to run (ride) away, most likely your faster on bike and on foot.
#2 9mm or larger compact pistol
I know most people here are anti-guns, but if the bad guys aiming for you are armed do you want to wait for the police or throw pepper at them (drugs affect the way people react to pepper spray they may not react at all, and how good is your aim with that can, ever shoot it?). A weapon should not escalate the situation, it should finish it; the only time to draw is if you are put into a inescapable life threatening situation. It's about the right tool for the job, I wouldn't take my mtb to the velodrome, likewise I wouldn't use a sporting implement or table seasoning to defend myself. Of course get trained and licensed according to your state laws.
* for the record I do NOT carry a pistol on my commute, although I am capable and equipped enough to defend myself, my commutes biggest treats are cars, dogs, skunks, and city bus drivers.