In addition to speaking directly with your coworker, if you get suspect comments in emails or instant message, screenshot them and save them (including your reply). If this person ever cross the line, it helps demonstrate a pattern of behavior which is easier for HR to take action against. I gave a coworker this advice and it lead to a very quick dismissal.
Additionally, consider emailing yourself to create contemporaneous memos directly after any inappropriate interaction. A simple paper trail of exactly what happened while the events are still clear in your mind.
Even if you never end up needing them, it may be helpful to have these documents sometime in the future.
So sorry you're being forced to deal with this type of harrassment.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In addition to speaking directly with your coworker, if you get suspect comments in emails or instant message, screenshot them and save them (including your reply). If this person ever cross the line, it helps demonstrate a pattern of behavior which is easier for HR to take action against. I gave a coworker this advice and it lead to a very quick dismissal.
Additionally, consider emailing yourself to create contemporaneous memos directly after any inappropriate interaction. A simple paper trail of exactly what happened while the events are still clear in your mind.
Even if you never end up needing them, it may be helpful to have these documents sometime in the future.
So sorry you're being forced to deal with this type of harrassment.