UTM professor draws on past struggles to write witty, hands-on programming book

" "

Daniel Zingaro almost didn’t become a professor of computer science. Among other things, he felt like a complete failure at it.

“I struggled a lot learning this stuff when I was a student,” he says. “My grades weren't that good.” Granted, he had a big challenge to deal with – he’s been blind since birth. When he first tinkered around with coding as a child in the ’90s, he’d include little beeps and boops in his programs so he could make sure, by listening to them, that they were running. 

" "

These days, Zingaro teaches at U of T Mississauga, where he’s beloved by his undergraduate students: It was recommendation letters from them that helped him win an Early Teaching Career Award last year. (“He is an absolute slice of apple pie,” as one wrote on RateMyProfessors.) This fall, he’s publishing the book Algorithmic Thinking, an introduction to some of the more sophisticated, head-busting problems that one encounters in coding.

He’s never quite forgotten, though, the feeling of being totally perplexed by programming – of feeling that he’d never get it. He remembers spending hours as an undergraduate puzzling over programming concepts, while other students would seemingly breeze through. Everything took him longer. “I started to wonder whether I just wasn't good at CS,” he notes. “I felt like it was a win every time I managed to do anything.” And learning recursion – a part of computer science where an algorithm refers to itself, over and over? “It's like abject torture, to understand how that works.”

These days, Zingaro knows what was wrong, and it wasn’t him. Too many computer science professors were early bloomers, nerds “who just think in code.” That makes them talented programmers, but it can hinder their ability to teach, because they have trouble grasping the mental state of the neophyte. 

In contrast, when Zingaro is teaching, he still remembers the confusion he felt. It helps him find common ground with his students. 

“You have to remember, OK, this stuff is flipping hard,” he says. He’s learned to move a lot more slowly, to explain computer science concepts using concrete, vivid examples drawn from real life.

That’s part of what makes his new book Algorithmic Thinking so oddly fun to read. Many computer science textbooks can be quite abstract. In contrast, Zingaro illustrates every style of algorithm with often-witty illustrations and sample problems. At one point, he dives into “memoization,” a technique that can speed an algorithm up by having it remember the results of previous calculations. He illustrates it by asking readers to puzzle over all the possible ways two hockey teams could have scored goals during rivalry games. (“I live in Canada, so I suppose we weren’t getting through this book without some hockey,” he writes.)

“A lot of students won't be able to understand the problem based on an abstract description – you need to throw actual games at them,” he adds. 

We’re in a heady moment right now for computer science, as he knows; it’s a hot field, with students clamouring to take the degree. “There’s this exuberance,” he notes. Zingaro’s goal? “To slow down a little bit and try to let a few more people in.” He’s teaching them, and he’s also learned from them. 

“I feel like the whole book,” he says, “born out of the interactions I've had with students.”


The print edition of Algorithmic Thinking will be released in October while the ebook will be available this summer.