I am by no means an expert martial artist, but just to keep this thread going I'll toss my 35 cents in (adjusted for inflation).
When someone is moving towards you with the intent to immediately attack you -- i.e. they are stepping towards you to either grapple or strike and are virtually at arms' reach -- your very first object should be to attack them first. Even if you can't commit to a strong, powerful punch, getting in the first strike is vitally important. The mindset of the person in that split second before they start to actually attack you is of total focus on their target. If they intend to punch you in the head, they are focusing on your head and planning their attack (yes, even in a fraction of a second). Quickly closing the distance and striking while the person is in this frame of mind will not only greatly increase the chances of landing the blow, but will likely take them completely by surprise and disorient them enough for you to either escape or continue to incapacitate. A shuffle-step and a lightning jab to the nose is a great opener. Remember that if your aim is to stun or disorient and land a blow before they do, maximum power is not your goal, speed is.
Of course the internet is not a replacement for actual real-life training. Get yourself someone who knows what they're doing, and work with them. A few hours a week of light-contact sparring will take you very far.