import600's post was interesting and reminded me of when I got mugged I would have responded there but it was closed
I live in Denver CO and I've been commuting to school and work for over 3 years when I lived in boulder I never had any problems but I also never went more than a mile or two
I moved back to Denver and I've had two major crashes no injuries just scrapes and bruises and one broken bike frame (don't ride on sidewalks)
I do not consider my neighborhood very dangerous and my normal commute is 10 miles but one Sunday morning I was riding to the bus stop (I was being pretty lazy and this car pulled and stopped right in front of me and I had to slam on my brakes . I was pretty confused as I had just woken up and it was 6 in the morning usually I never even see that many people around that early and Sundays nobody's even awake. So these two guys one white one hispanic got out of the car and I was punched in the ear and then the other was on the other side of me and hit me too. I tried to get away but my leg slipped off my pedal, I had unclipped accidentally when they stopped the car, and my pedal knocked my chain off the rings and my leg went into the big chainring (a cool little scar). Then they punched me some more and they said give me your money so i threw my bag down on the ground and bolted down the middle of the busier street that I was going to and I ran into the only place open some burrito shop and probably scared the crap out of the girl working there. I called the police then looked outside and they had driven off but they left my bag untouched and my bike was still there all that was lost was my cell phone dignity and a water bottle. My eardrums were also ruptured and I had to go to the emergency room. The police came and wrote up the report but in my rush to get away I did not remember the license plate number.
I consider myself pretty lucky that the guy didn't hit me with the beer bottle he had in his hand.
My advice would be do not stop for anyone, just nod if they sat hello and be on your way, you should wear a helmet maybe get a less flashy or bmx type helmet but still wear a helmet. I don't think a weapon really would have helped me but a cup of coffee to give me some alertness could probably have made it more avoidable. Just be alert and watch your surroundings.