Incoming university students who have not previously studied computer programming often find it a challenging subject, leading to high failure rates. Research has suggested that the lack of a formalised structure for collaborative learning may be one of the factors responsible for students' negative impressions of computer science. In this study we investigated whether the use of pair programming in practical laboratories would facilitate peer learning and enhance students' confidence in their programming ability. Results showed that this intervention was generally well received, although the weaker programmers (as measured by prior exam grades) perceived it to be of more benefit than the stronger ones. Students who reported a lower initial level of enjoyment and confidence in programming were more likely to report learning from the paired intervention, though this did not necessarily lead to enhanced performance. The most frequently reported positive feature of pair programming was that it allowed students to meet more people in the class. Although there was no significant increase in final exam grades for male students, there was a significant increase for female students, suggesting this teaching strategy may have asymmetrical gender benefits.