> I got asked to write a function that calculates all the subsets of a given set.
I very much dislike the interview questions which roughly translate to "do you know combinatorics/<insert-some-other-area-of-math>?". Even back when I was personally good at those questions (straight out of University), they were less interesting interview questions.
I'm sure there's some jobs where it's relevant, but for the vast majority of software jobs... not so much. I get why it's done - they can be small, self-contained problems, which don't require a lot of external context. And they can be easier to come up with.
> The problem wasn't the question, though. It was that the person asking me this didn't even know what "yield" was in Python.
That is a problem too. As an interviewer, I'm okay with someone using a language or lang feature I don't know, so long as they can explain it. Some interviewers are much less flexible. Hell, sometimes I'll feign ignorance over some lang feature just to see what their explanation is like, because it's a measure of signal on how well they can teach a feature to a more junior dev.
I very much dislike the interview questions which roughly translate to "do you know combinatorics/<insert-some-other-area-of-math>?". Even back when I was personally good at those questions (straight out of University), they were less interesting interview questions.
I'm sure there's some jobs where it's relevant, but for the vast majority of software jobs... not so much. I get why it's done - they can be small, self-contained problems, which don't require a lot of external context. And they can be easier to come up with.
> The problem wasn't the question, though. It was that the person asking me this didn't even know what "yield" was in Python.
That is a problem too. As an interviewer, I'm okay with someone using a language or lang feature I don't know, so long as they can explain it. Some interviewers are much less flexible. Hell, sometimes I'll feign ignorance over some lang feature just to see what their explanation is like, because it's a measure of signal on how well they can teach a feature to a more junior dev.