4 ms·
I've been doing this for 30+ years, and I've found the same. It's not just whether the candidate can answer correctly, but how they answer. Back when I was doi
by CWuestefeld 4y ago
I've been doing this for 30+ years, and I've found the same. It's not just whether the candidate can answer correctly, but how they answer.
Back when I was doing C/C++ interviews, I'd ask questions like:
What's the difference between single and double quotes? A meh candidate answers something about you need single quotes for just a single character. A good candidate answers about how the data type for a double-quoted constant is a char.
If I want to pass a variable into a function, and have its value changed by the function, what do I do?* A lousy candidate says "put an ampersand in front of it". A meh candidate says to pass a pointer to the variable. The best candidate will talk about the difference between call-by-value versus call-by-reference.
People really do reveal a lot about themselves not just in what they say, but the way they say it.
- jenscow 4y agoBoth great questions, where the answer will give you a level of knowledge, rather than a yes/no. (personally, I would be a meh candidate until you probed further - but I've not touched C for.. hmm, I'm old) I often get questions where I need to determine if they're looking the textbook answer, or a real-life answer. Usually I will go with "well generally, the answer is $Textbook. However, ..."
- CWuestefeld 4y agoI just realized that my above model answer gets broken by the formatter. the first question should get answered with char-star, that is, pointer to char.
- ARandomerDude 4y agoThis is why I don't use C. ;)
- Izkata 4y agoIf you put a backslash in front of the asterisk it should be kept as-is instead of triggering the formatting.
- MaxBarraclough 4y ago> If I want to pass a variable into a function, and have its value changed by the function, what do I do? A lousy candidate says "put an ampersand in front of it". A meh candidate says to pass a pointer to the variable. The best candidate will talk about the difference between call-by-value versus call-by-reference. I agree it's good for a candidate to demonstrate a solid understanding of evaluation strategies, but the way you phrased the question, the 'meh' answer seems about right. You asked what do I do? which invites a narrow answer specific to the language.
- Sohcahtoa82 4y agoAgreed. In fact, I had an instructor in college that would have marked you down if a quiz/test asked this question and you wrote an entire paragraph describing call-by-value versus call-by-reference. On the final, he said "Each of these questions is answerable in 1-3 sentences. If you're writing 1-3 paragraphs, you're wasting my time and I will subtract points even if your answer is correct."
- ryandrake 4y agoWe need your professor to coach interview candidates. On the "interviewer" side of the table, I can't tell you the number of times I've asked a question that should produce a quick, simple answer, and instead got a 5-10 minute stream-of-consciousness word salad out of the candidate. Or a huge run-on sentence this-and-that-and-this-and-also-that-oh-and-this... without coming up for air. It's so common, I must assume that these kinds of replies are being taught to candidates as some sort of best practice.
- MaxBarraclough 4y agoI suspect many interviewers reward using a question as an opportunity to showcase knowledge though, even if it means rewarding that kind of expansive verbosity. I suspect the this and also that you allude to is the candidate not wanting to be called out for failing to mention a corner case or tradeoff. Of course, conversations are rarely legalistically constrained to answering only the precise letter of a question asked; it's a matter of degree. Forgive a painful mixing of metaphors: if the Workplace StackExchange is anything to go by, one interviewer's flying colours are often another interviewer's red flags.
- anonymouse008 4y agoCompletely off topic, but I wanted to see if your bio could be parsed for an email with chatGPT - since I thought yours was the most interesting I've seen in some time. Turns out cgpt is quite clever: What's the email address: To email, send to the domain [redacted], using the mailbox "[redacted]". In general, email addresses consist of a username followed by the at symbol (@) and the domain name, such as [redacted]@[redacted]. However, without being able to verify the existence of the domain [redacted], I cannot say for certain what the email address would be.
- anonymouse008 4y agoHey someone flag the above comment - I’m an idiot and left the email in there
- dang 4y agoWe've redacted it now.
- CWuestefeld 4y agoas the person you're talking about - I just up-voted you anyway, just because this is interesting :)
- EmilyHATFIELD 4y agoWhy would using pointers be better than references ? At least a reference cannot be null?
- CWuestefeld 4y agoWell, at the time I was doing that, it was actually for a C and not C++ job, so &references weren't even a thing. But my point wasn't that using the ampersand is wrong - just that if that's how you describe what you're doing, you probably don't have a very strong foundation in how the language really works.