Closed SamiraMHosseini closed 11 months ago
Twitter thread: https://twitter.com/lefticus/status/1554844035751165952
Ideas:
auto
main
.See this terrible example: https://twitter.com/IgnitionWeb/status/1554865524500320260
If you think you're a 4/10, you're probably a 2/10. If you think you're an 8/10, you're probably a 9/10
~Isn't this partly backwards?~
Wait, never mind. Just double-checked the wiki article and this makes sense.
"Demonstrate curiosity" as this seems to be one constant I've gleaned primarily by being the interviewer, but also being the interviewee. If you don't know the answer to something then don't be afraid to acknowledge that up front (it's usually not hard to tell), but equally if you think you might know something related then ask them if they'd like you to speculate. Later on in an interview, I typically ask a question that has no right/perfect answer that requires the candidate to speculate on something that could have any number of possible outcomes depending on what the compiler does, time, threading, and it's ideally a very interactive discussion. The purpose is to see how well the candidate collaborates on something they aren't trivially able to answer. The best outcome is that they get really interested in the problem & discussion and forget they're in an interview at all and this gives me a feel for what it will be likely working with them. The worst outcome is a refusal to engage at all. I'm not saying this is perfect and it certainly has to be done sensitively (and once they are relaxed) but I have found it to be useful to me.
A few that I remember hearing/using:
Then we could show some code for review or do a quick "pair programming session" with a quick assignment.
Assuming a candidate for something beyond a graduate role, a very key indicator for me is some understanding of resource management followed by being able to write exception neutral code. In my example I tend to combine them both to something like:
int * data=new int[100];
do_something(data, 100);
delete data;
The sorts of things I am aiming to tease out are:
The actual choice for the"do_nothing" may vary between some inline code that actually demonstrates a throw. As interviews are quite artificial situations it can be more helpful to show something concrete, but at the risk of making the question more involved.
const
and its various uses in C++ (member function, member variable, automatic variable, static variable)Closing as merged with #194 that episode is not C++ specific, but I think it all comes around.
I haven't been able to find good and reliable resources for C++ interview questions and I am lost and don't know what to study and what topics matter most!