@lain
I don't mind the reply that says "don't do X, Y is better" but they do get uppity about it sometimes.
Suggesting an alternative method that avoids some disadvantage of the method proposed by the newbie is a good way of informing them without forcing them away from the learning experience of doing it the suboptimal way, if they want.
Plus sometimes it's only bad under certain use cases. I've seen overblown code because some long time coder decided to cram every single best practice in there that didn't need to be there.
Meanwhile my friends are out here writing cursed code simply because It Works™.