There's one case of an ad hominem that is ALWAYS a fallacy:
The favorite atheistic "you're religious, hence you are an uneducated idiot and your religiousness is borne solely out of scientific ignorance".
Notes:
1. This often comes from people who themselves show zero knowledge of even the most basic science like biology or physics.
They just chose to believe it with the same zeal that a religious fanatic feels towards their religion.
2. There are quite a few scientists who are religious, and religious leaders with a university degree in science.
The two have no counter-correlation, unlike what atheistic fanatics believe it to be.
3. Even if the religious side actually is quite uneducated, that doesn't mean that the atheist side has any valid points based on actual science in the discussion to begin with.
More than often, it literally boils down to a cat-fight between "snobbish science thumper atheists" -vs- "arrogant holy-than-you fanatic theists".
Neither being the RIGHT side objectively - yet going at a full-out insult-a-fest all over the text.
So, yeah, just wanted to share this point.