The law is very clear on discriminating against someone by virtue of race, gender and/or age in a work situation.
A lawyer could make a very good case just based on her side of the story for the law being broken.
Against the coder who undid her work because he was rejected by a woman, that is classic retaliation pure and simple. Most cases like this that don't go to court settle in the Valley for $250k. It's a million at a minimum in the Valley if it does go to court.
As far as the wife goes, there was so much innuendo in the article that I wasn't sure what to conclude. Was the wife suggesting she hook up with her husband because a happy husband would make the former employee's situation better? If so, another classic open and shut case.