There gets to be a time when someone does something enough, you just can't trust their word anymore. If someone uses lies and fallacies enough, their name becomes connected to it, thus it's valid to dismiss say 'Micheal Moore' with Ad Hominem attacks for his history, even if he has something new to say.
A political party dismissing a potential candidate for public knowledge of past adultery, is a fine example. Ad Hominem or not, it's no longer a wise investment since you know the opponents will use those attacks and win.
Playing dirty isn't fair, but using a hominem attack to bring a matter to light for societal purposes is another matter. Say I'm running for public office and I hire an investigator to dig into my running mates background. Several weeks later the investigator reveals to me with supporting evidence that my running mate has had multiple spousal affairs and is a heavy drinker behind closed doors. I believe that I have no option but to make a hominem attack against my running mate and reveal this information to the public. Multiple affairs and heavy drinking speaks mountains about his character and should be public knowledge prior to possibly elected this character into a public office. Hominem attacks are not always acts of selfishness, although quite often they are. Sometimes however, these attacks are necessary for the common good of society
I think attacking the person is always less effective than arguing with logic and focusing on the issue. Otherwise, it will just lead to trading personal attacks back and forth, with no kind of helpful resolution. Some people are just not willing to discuss an issue with an end goal of walking away with a better understanding. Instead, they just simply want to win their argument by whatever means necessary, and this often involves the use of ad hominem.
It's important to point out that simply identifying biases or vested interests of the speaker is not an ad hominem. A true ad hominem attack consists of dismissing, ignoring and deliberately diverting attention away from any legitimate points the speaker is making.
An ad hominem fallacy is by definition the use of a personal attack that is irrelevant to the discussion at hand. Their use is childish and petty, and usually means the user has no actual argument to make. Resorting to juvenile insults to distract from relevant matters is never valid.
When I am sharing my understanding of an issue, I beg you to have a reasonable conversation with me about the question. I don't want to hear that because I am tall what I say is not valid, or because I am Irish or because anything. If you do not want to discuss the issue simply say that you don't stop telling me what is wrong with me just to stay engaged.