One thing that is often forgotten is that the attacker or "bad guy" also gets a say in the event. The attacker gets to initiate the event, meaning that you only get to respond. The attacker gets to choose the timing of the attack as well as how prepared you are for the attack (to some degree). When was the last time you saw a sporting event in which one team said "we are gonna do it this way" and that was the way it went, flawlessly and without opposition?
Defense is, by its nature, a reactive process. We only have the time we create for ourselves. If we are properly attuned to our environment, we can create more time and space prior to the attack. If you keep at least some of your attention on the world around you, it is easier to see what could be a dangerous situation before it is too late.
If you are even uncertain, having your less lethal defensive tools in hand is not a bad idea. Using a flashlight to check dark areas or see what is lurking near your car is a good idea, and it also projects preparedness. Holding your pepper spray also looks very innocuous, but it is ready if needed.
Being aware should also not be performed in a sneaky manner. If you are seen looking around and checking your surroundings, you may be more likely to be "deselected" from the criminals victim selection process (William April, 2017). Making it known that you are aware and prepared can be the best deterrent.