In Montreal, many companies routinely ask if a developer has open source projects, or code samples.
If a company doesn't do this they are hiring based on resume and interview only, rather than seeing actual code.
That's exactly my point. No one here (at least in my experience) focuses on open source contributions per se. The end goal generally is to look at some code that a candidate have written, not necessarily the open source one.
Of course there are exceptions. For certain positions you will get a big bonus for any contributions to a specific high-profile open source project. But this has less to do with a code you wrote and more with domain knowledge you picked up along the way.
But I think the question of open source contribution is completely different from "show us some code." The latter is intended to get a look at some of the actual work you've produced; the former is just another part of your work experience, formal or informal.
> Contributing to open source projects matters more than your marks in school to us and to a lot of other companies around.
Maybe it matters more to them and perhaps it's specific to India, but in Canada participation of a candidate in open source projects is of just a cursory interest. Besides quoted exchange states that they simply wanted to look at guy's code. If so, then just ask for it. Getting into "thou shalt contribute to the open source" tirade is pretty much pointless given the context.