Me again, original poster here.
Thank you to all for the interesting responses. I enjoyed reading them all, and they have offered various sorts of insight as to what I experienced. Thinking about the incident, and then reading another thread up here about the "Pizza Brawl," I can just think about awareness. I am a high energy person, always on my toes, and I am rarely caught by surprise.
I left out some details of my attack. My attacker had until about a week earlier been dating a friend, and was violently refusing to leave her apartment. She and I were removing some of her belongings, while he was away at work. Several things were missing, the police came over, said they couldn't do anything about the situation, told us to take some pictures of everything, and then left. We think he had someone watching the building tip him off, because he showed up immediately after the police left. My friend panicked and locked herself in the bathroom, leaving me in the open and defenseless. We both knew enough to know that his man was irrational, violent, and was passionate about doing one of us harm.
When he came through the door, I immediately retreated deeper into the apartment, and the moment of decision didn't come until about five seconds later when my back was to a wall in the master bedroom, and I escaped. The entire time, I was aware of what was going on, and though my situation was far from "good," nothing caught me by surprise.
My other friend, when robbed at gunpoint, was first approached by the man who asked him some directions. My friend was unable to help him out, and continued on his way, putting his back to the person. I am not blaming him for the robbery at all, but noticing a difference in awareness. It was at this moment the man grabbed his arm and put the gun into my friend's back.
My current thoughts are that there are two times when a person would attack another and the two parts of my story show both times.
1) The guy that attacked me was violent and irrational. Possibly mentally ill. He was in a fit of rage and passion and made no effort to hide his intent. Whethor by metal defect, drug abuse, or just an evil heart, his intentions were clear to read. In many situations, it would seem easy to defend against such a person, even if it means slipping past him, and then escaping. The key is to try to avoid a violent clash. My case may have been a bit of an exception, with my back to a wall.
2) The guy who mugged my other friend was extremely rational. He use calculating strategy in the mugging, and successfully hid his intentions until he had an opening (my friend turned his back) to exploit. In such a case, it seems the best course of action would be to be "more aware" of your surroundings, and if any questionable circumstances arrise (a large shady guy with his hands in his pockets asking you weird questions), that you don't take your eyes off him and keep a safe distance. I will point out that there have been many times I was in the same parking lot as the mugging, and had a "bad feeling" about some of the people hanging around there. Speculation more than anything, but I have always had my guard up in those places.
Anyway, I guess I am currently concluding that humans are humans, subject to desperation, irrational passion, and at times cold hearts. At other times, humans can be a source of great inspiration. At any rate, I know to keep my guard up when necessary, down when safe in order to experience all of the positive, without further subjecting myself to the negative. Just my current thoughts, perhaps age, experience and wisdom will change them
Anyway, thank you to all of you who have posted your ideas, insights, experiences. I do appreciate it!