When criticizing, it helps to have a clear reason why. It may be a good faith attempt to help the other person, or because their actions affect some other thing they are contributing to, or because their actions have unintended consequences for someone else. Regardless, there should be some benefit beyond one's own gratification. If you catch yourself enjoying the act of criticizing others, it's probably a good idea to doublecheck your motivations and results to make sure that it's actually for someone else's benefit.