Greg Wilson

Greg Wilson

Years ago, I lost my temper while arguing with my brother, and said, "Jeff, I could teach you everything I know and you'd still be an idiot." Please keep that in mind as you read this site.

Co-founder of Software Carpentry
Editor and author of books on computing and teaching
(and for children)
Ph.D. in Computer Science
Parent, spouse, and proud Canadian

Late Binding

Feb 16, 2019

I’ve been working on a new Jekyll template for lessons that can also be used to produce nicely-formatted PDFs, mostly to give myself an excuse to do a little programming every once in a while. I wanted to do the whole thing in pure GitHub Pages-compatible Jekyll without any plugins or compilation, but section references defeated me, so authors still have to run a little script to regenerate a table of contents and commit it.

Examples Wanted for Code Review

Feb 11, 2019

There’s a lot of good advice on the web about how to do code reviews, from Cohen et al’s Best Kept Secrets of Peer Code Review to articles like these ones. What there isn’t a lot of is curated examples that are accessible to novices, particularly novices who think of themselves as scientists first and programmers second. The code in projects like scikit-learn or dplyr is much more complex than what most scientists write, so pull requests in those repositories can be pretty intimidating. Novices would probably find feedback on fifty-line scripts at the level of an introductory college course more helpful, but feedback on course assignments is usually private and usually focuses on the statistics rather than the code.

Libraries Tell It Like It Is

Feb 5, 2019

Classifying Data

Feb 4, 2019

With apologies to Borges, I believe that all data sets can be classified as follows:

Things I Didn't Tweet This Month

Jan 31, 2019

  • “I did then what I knew how to do. Now that I know better, I do better.” - Maya Angelou

Why I Teach (Revisited)

Jan 30, 2019

When I first started volunteering at the University of Toronto, students occasionally asked me why I would teach for free. This was my answer in 2004:

When I was your age, I thought universities existed to teach people how to learn. Later, in grad school, I thought universities were about doing research and creating new knowledge. Now that I'm in my forties, though, I've realized that what we're really teaching you is how to take over the world, because you're going to have to one day whether you like it or not.

My parents are in their seventies. They don't run the world any more; it's people my age who pass laws, set interest rates, and make life-and-death decisions in hospitals. As scary as it may be, we've become the grownups.

Twenty years from now, though, we'll be heading for retirement and you will be in charge, because there won't be anyone else to do it. That may sound like a long time when you're nineteen, but let me tell you, take three breaths and it's gone. That's why we give you problems whose answers can't be cribbed from last year's notes. That's why we put you in situations where you have to figure out what needs to be done right now, what can be left for later, and what you can simply ignore. It's because if you don't start learning how to do these things now, you won't be ready to do them when you have to.

I updated my answer just before I left in 2010:

This is stirring stuff, but it isn't the whole story. I don't want my students to make the world a better place so that I can retire in comfort. I want them to make it a better place because it's the great adventure of our time. Two hundred years ago, almost every society in the world practiced slavery. A hundred years ago, when my grandmother was young, she wasn't legally a person in Canada. Fifty years ago, most of the world's people suffered under totalitarian rule; in the year I was born, judges could and did order electroshock therapy to "cure" homosexuals. Yes, there's still a lot wrong with the world, but look at how many more choices we have than our grandparents did. Look at how many more things we can know, and be, and enjoy. And most importantly, look at how many other people can too.

This didn't happen by chance. Every time we buy one brand of running shoe rather than another or take ten minutes to vote we are choosing one future over another. Every time we help someone do something they couldn't do before, we are giving them more choices and more control over their own life. The world doesn't get better on its own. It gets better because we make it better: penny by penny, vote by vote, and one lesson at a time.

I am less optimistic today than I was then. Climate change, mass extinction, surveillance capitalism, inequality on a scale we haven't seen in a century, the re-emergence of racist nationalism: my generation has watched it all happen and shrugged. The bill for our cowardice, lethargy, and greed won't come due 'til my daughter is grown, but it will come, and by the time it does there will be no easy solutions to these problems (and possibly no solutions at all).

So this is why I teach today: I'm angry. I'm angry because your sex and your color shouldn't count for more than how smart or honest or hard-working you are. I'm angry because the Internet has become a cesspool. I'm angry because billionaires are playing with rocket ships while the planet is melting and because Nazis are on the march once again. I'm angry, so I teach, because the world only gets better when we teach people how to make it better.

Computing Skills Books for Researchers

Jan 28, 2019

Thrice upon a time, I ran Software Carpentry as a one-semester course at the University of Toronto. I toyed with the idea of turning those notes into a textbook, but got a little sidetracked.

The Elements of Programming Writing Style

Jan 26, 2019

Along with my list of unwritten books about programming, I’ve kept a haphazard list of ones that have influenced the way I write about the subject. Sometimes what I’ve learned from them is stylistic, other times it’s about how to shape content, but I think they’re all worth looking at if you’re writing about code.

The Principle of Least Precision

Jan 24, 2019

Another day, another attempt to formalize something whose utility lies in its informality. Rigor and precision have their place: if someone asks, “What’s the semantics of slicing?” and the project lead said, “I don’t know, look at what the code does,” it’s time to join a different language development project. But UML and the Semantic Web and Loglan failed to catch on on for good reasons. Human beings aren’t analytic machines; we reason by analogy with what we’ve seen and done before and only resort to logic when we’ve painted ourselves into a corner and have no other option. Even in the purest of pure math, our “proofs” are little more than stepping stones across a river rather than an unimpeachable atomization of truth.

Leadership Training for Open Science

Jan 10, 2019

Many people in various open science communities have technical skills and good intentions, but no experience engineering structural change in organizations. Updating curriculum guidelines to make room for data science training, nurturing a regional R user group that can sustain itself, removing bias from hiring practices, and convincing politicians and business leaders to base policy on the best available evidence all require a set of skills that most data scientists have never been taught.