$\begingroup$

As suggested in a comment, I'll add the following.

The purpose of an education goes beyond the learning of narrow technical skills. If you graduate with that, but nothing else you probably don't have a very bright future other than via some serendipity. There are rare exceptions of course, but for every "creator of a major OS who has people issues" there are likely thousands of others who are isolated in their lives and unemployable.

Both the Prima-Donas and the total introverts (even the autistic) need to have a way to grow personally as well as professionally during their school years and CS instructors can't just leave it to someone else. Your job is to educate your students, not just present them with technical details. Part of the education of any professional today is learning how to work well in team situations. That is the purpose of student teams. It is not (NOT) the more efficient production of some software.

So, you need a way to give the social outliers a way to learn those skills, even if their natural tendencies lie elsewhere, and even if they don't do as well at socialization than at tech. They have to start and they have to advance.

Furthermore, pairing like with like is sub-optimal: Homogeneity doesn't let them grow. If your superstars only work with other superstars they won't really learn much and might fight like cats and cats. At the other end of the scale (the extreme introverts) I predict long, unproductive, silences. People need to learn to work with people not like themselves - variety is the chocolate-of-life. Both of those traits limit the individual and both can be overcome. One of the best public speakers I know and an inventor of an important programming language is extremely introverted. He taught himself to overcome his "handicap" by playing a role when needed, not by changing his personality. My personal case is different. I am, by nature, very introverted, but have actually changed my personality and few, other than my spouse, recognize that introversion. I did it by forcing myself out into the open and then deciding that the consequences weren't as dire as I'd expected. Your personality isn't deterministic of what you can do, just how hard it is to do some things. But teachers need to help students, especially young students, deal with this.

That said, in a team, it is possible that different people take different roles. It is best if you can find a way for them to switch roles (and in pair programming it is essential that they do so), but it may not always be possible or worth the disruption.

One option is to make your superstars tutors or teaching-assistants. If your project has roles, give them a non-programming role, since they won't learn much from just programming if they already excel there. Or give them a tester role. Or a tool builder role. But best if they can also learn to work with others. As a tool builder the rest of the team becomes their customer, similar for tester. They have to interact, but can't just take over. Their role may not require intense interaction with everyone else, but it does require some. Roles like this also confer responsibility on the individual while permitting them to do their own thing up to a point.

Teach the whole person, not just the geek. Expect that they are all different, with different strengths and weaknesses. Your job isn't to "fill them up", but to "change their brains."