Is praising students' aptitude harmful? As a computer science professor, I have told some talented students one-on-one that they show a real aptitude for computer science and that they should seriously consider taking more classes in it.

I'm questioning the wisdom of this now that I'm reading Mindset: The New Psychology of Success by Carol Dweck, which cites extensive research on the benefits of having a "growth mindset" (the belief that intelligence can be grown) over a "fixed mindset" (that intelligence is unchanging).

Additionally, two of the students I recently told this to performed way below their ability in the second CS class.  Of course, this is not statistically significant.

FWIW, I teach at a women's college with a large number of students who are the first in their families to attend college and/or from ethnic groups underrepresented in CS.  Thus, all of my students are at risk of stereotype threat for at least one category to which they belong.  It was my hope that pointing out their aptitude would help counter this and encourage them to pursue an area of strength.

Is there any research on whether it is a good idea to let students know a professor believes them to have aptitude, or is promoting the idea of innate aptitude likely to backfire?
Praise tangibles, not intangibles.  

Tangibles
Say things like:


I was impressed with the way you were dedicated to completing programming assignments, even when they are difficult.  Other students gave up, or skipped requirements X, Y, and Z.
You did a great job thinking through the logic on the Data Structures assignment.  I'm assuming that you took the time to think it through on paper, or in pseudo-code first -- something that a lot of first year students never do.
Your algorithms are elegant and show that you studied the coursework and theory behind them.  In particular, on the travelling salesman problem, I could tell that you took the time to study the problem, and think through different solutions.  Well done. 
You used parts of Java (or C#, C++, whatever) that I didn't teach.  That gets me really excited, because it is the mark of a great programmer that they are inquisitive about better ways to do things, and to learn their tools without waiting to be spoon-fed.  


Then you can follow with encouragement related to those tangibles, such as, "based on the skills and work ethic you've demonstrated, along with your willingness to put in the effort to solve problems, I think that you could make a really talented programmer.  If it interests you, I hope to see you in more CS classes in the future."

Intangibles
Avoid generalities like:


You'd make a great programmer!  You should take more programming classes.
You've got a great mind for CS.  It's not for everyone, so it's fun to see talent in such a young student.
If you stick to programming, I know you'll go far.


Intangibles can set people up for failure because they don't help them identify and grow their strengths.  If a student earned an A in your class, it's because they worked hard, and were determined, and stuck to it.  But if you tell them that they are "good" or "talented", without telling them why, it gives them the impression that their success is not because of their hard work, but is because of some unnamed virtue inside of them.  This can lead to a variety of ills:


They may have only taken that class to fulfill a requirement, and may have worked extra-hard because they were nervous about passing it.  If you praise them by saying that they are a "great programmer", it risks pushing them to continue with a field that may not actually interest them.  Worse, it can make them coast in the future.
It can actually hamstring them, because they are afraid of letting you down, but don't know what it is about their work that pleased you.


Your intentions are good, and it's great that you want to encourage these young women to feel empowered to tackle a field traditionally dominated by men.  But when you encourage them, be sure to give them tangible feedback, not just generalities.

Hope that helped!