Absolutely. After all, you are hiring them to help you with the work, so you want to be sure they can. And this kind of question can give you insights into personality and thought processes, too.
My reference was to a time when I was asked to proof, reformat, edit, and finalize a 30 pager for a company. One page to see if I knew what I was doing would have been acceptable. An entire document? I don’t think so.
I’m not an engineer, but I did marry one, and I’d say it’s not possible for any recent electrical engineer. SpouseO, who’s an electrical engineer, took a plethora of programming classes during his college career, from C++ to Java to Assembly to what-have-you. He programs regularly as part of his job. He knows several electrical engineers who do nothing but program (he likes hardware, and so will probably never switch to a job where he programs all of the time).
I can rather see how a civil or mechanical engineer might not be so extensively schooled in programming, but an electrical engineer? No way an EE doesn’t know what a compiler is.
It’s conceivable but it shouldn’t take an enginner long to figure it out. When I first started all computers were large, main-frame machines and were programmed by programmers directly in machine language. When the “conversational” languages came into being the machines hadn’t changed so obviously there had to be some means of converting the high-order stuff like FORTRAN into the correct sequence of 1’s and 0’s that the machine uses.
One of the very early approaches to higher order languages where I worked was something called “QUEASY” standing for Quick and Easy. It was limited, there were no uniform standards and it still had to be done by a programmer who knew machine language programming, but they could rapidly put together programs for simple jobs and use the QUEASY compiler, although they didn’t call it that, to make it into code for the machine.
The calculator program could be tricky. If you also have to write the parser, and you’ve never studied the relevant theory, the project could take four hours.
This thread is of interest to me as I start interviewing for CS jobs in the spring.
It would prove that, but don’t think that everyone with IT experience could code an arithmetic program. I’ve been in IT for nearly 20 years; I can code and have coded many different things, but I couldn’t code a calculator off the top of my head, because it isn’t something that has ever come up. It might make more sense to ask the interviewee how they would approach the problem, to evaluate their analysis skills.
I had to write a program when I interviewed. They mainly wanted pseudo-code, but they wanted it to look like a language. I can’t remember the details of it, but it had a twist or two in it. It basically looked like it was designed to eliminate someone who had no experience at all.
However, I had another interview for a programming position where it was mostly chat. They’d ask me things like, “what’s an object?” and weird questions like “what’s the difference between a null pointer and a void pointer?” A question like that is something that would never cause a problem as a coder, and doesn’t really matter, but they just want to hear how you think, I guess.
Programming’s funny, though. You sometimes need to be the architect, sometimes the foreman, and sometimes the hardhat, but it’s all thrown in with “programming”.
To not know what a “compiler” is, though, is astouning.
I’m just a lowly admin but I can relate to this bit. We have a new starter in our team of 3 admin girls. She is the accounts administrator and comes from a costing background but has zero admin experience so in essence she is only 50% qualified (if that) for her job. The Managers stressed so heavily the idea of someone from a financial background filling the position but during her first stack of invoices she asked me dozens of questions someone from her purported background should know inside and out. (I, the lowliest admin in the office knew every single one of them).
She could’t figure out how to search on an excel spreadsheet and she makes £10,000 more than me. I’m at the point where I am lying to her saying I don’t know how to do stuff, hoping management will catch her struggling. One of the managers came in and upon finding her stumped told her to dump it on me.
My “office-rage” got so bad yesterday that I wrangled an emergency meeting with the Contract Manager. I got the same lines as you, my favourite being the “she’s the best we interviewed!”
Um, well maybe you should have interviewed more than 2 people for such a high paying job. Seriously, 2 people.
At least you are free of her, it looks like I am stuck with mine or I have to find a new job.