After more than three decades of teaching, Dan Harmer was tired of a trend he noticed year after year: His computer-science classes at Cardinal Leger Secondary School in Brampton, Ont., were filled mostly with boys, and the lone girls often sat quietly at the back.
Then, last fall, he had an idea. Mr. Harmer asked the school to pool the girls from all his Grade 10 classes into one…