Assign each student a procedural role necessary for the group to function to create the most equitable environment.
Only place the number of kids in a group necessary to complete the task, too many or too few collaborators leaves kids feelings distracted and underutilized.
Invite guest speakers to introduce students to the varied professions and people in computer science, especially to encourage girls to see themselves taking up STEM careers.
Encourage students to stick with CS by providing them with role models and mentors in the tech fields.