Condolences do matter and timing is important.
Do not put off contacting your friend to express your sympathy. Options and opportunities may have changes over the decades, but the importance of reaching out to those suffering a loss has not. A call or a written note is always just right. Social media is just fine under some circumstances and a personal visit is lovely. Additionally, many funeral homes have a place on their website to post condolences. This format allows your expression of sympathy to be delivered privately and quickly.
So, let's start with the newest trend - technology and social media. It's so fast and so easy to access. If you are texting a co-worker several times a day about other things, it would seem rude to not mention the loss of her mother. Do use private messaging forms of social media with people you communicate with regularly in this manner. Caution!! Be very careful to not send a public condolence message using social media if your friend has not made an equally public announcement of his or her loss on the same platform. Do follow-up your message with a call or personal note. Finally, do not use electronic messaging if the receiver is not a regular user of tech.
Hand written notes or cards made for just this purpose should be mailed to the person closest to the deceased or to a personal friend who has experienced a loss. Your personal note should be simple. Thoughts such as you are sorry for their loss, you are thinking of them in this difficult time or they are in your thoughts and prayers are appropriate. If you knew the deceased, you might share a brief story about the person who died and shares your connection.
Should you make a condolence visit? Oh, my yes! A personal visit is the only way to give a hug. However, do call ahead. Do keep your visit brief and do focus on the grieving individual. Please, don't say you know how they feel even if you share a similar experience. There will be a time for sharing later. For now, just let them know you are sorry for their loss. Come as a listener not a problem solver.