A piece of code during job interview

“Do you have any further questions?”
“No.”
“Thank you then, we will contact you.”

I left. When I was outside, I thought: they didn’t ask me to write a piece of code! I was asked, what’s the difference between __getattr__ and __getattribute__, but they didn’t want to see, how do I actually write code.

My favorite author, Joel Spolsky, writes:

Would you hire a magician without asking them to show you some magic tricks? Of course not.

That’s right… so I wasn’t asked to do any tricks nor asked about programming techniques. But I was asked about desired salary, which is always a tough part. I guess a company knows better, how much money it has for an employee. I was told I asked for too much (but they always say that, don’t they?).

So maybe next time I should…

“Do you have any further questions?”
“Yes. Why haven’t you ask me to write a piece of code?”

Or maybe I shouldn’t? It could question the competences of the person interviewing me. I’m not sure if that’s a desired attitude. It could be even perceived insolent.

Maybe it’s about the way of asking the question? For example: “I thought I would be asked to write a piece of code.” Or maybe there’s no right way to say it? Maybe it’s better to keep for myself the thought that they should’ve asked me?