I agree a lot of this depends on the environment. Are you asking people to work on things they enjoy working on? What's the team like? What's the culture like?
"Smart" is maybe something that can be measured in a vacuum (though in practice it means more than just IQ) but most of the other parameters are very much influenced by the company, team, managers. I totally agree that people can become unpleasant if they're in a bad environment or pushed in certain ways. I've worked with some people that I thought were total jerks and we eventually became great friends, often the friction at work is about something stupid/situational + the general social awkwardness of many software people.