Carol Dweck hits the nail on the head. You might think that “you’re so smart!” is a good thing to say to someone. You’d be wrong, though; that turns out to disincent people to work hard.

If you want to praise a student, a better choice is “you must have worked hard for that.”