BOSTON—Getting a computer-science degree at Northeastern University is no joke. One class was especially nerve-racking for Colin Mullaney, even more so than theory of computation or object-oriented design.

“I put it off to the end,” said Mr. Mullaney, who graduated this spring with a combined degree in computer science and mathematics. As part of the dreaded class, he mimicked elephant noises, imitated Michael Jackson dance moves and had to grunt in front of classmates while playing the role of a Viking rowing a boat.

Like...