Good opportunity for clarification of ad hominem:
You're stupid, therefore you're wrong. This is an ad hominem argument.
You're wrong, therefore you're stupid. This is a hasty generalization containing a garden-variety insult.
You're stupid, therefore you're wrong. This is an ad hominem argument.
You're wrong, therefore you're stupid. This is a hasty generalization containing a garden-variety insult.