5 ms·
I got asked once "what are the four uses of static in C++". I couldn't recall one (can't remember which one), though I'd shipped a lot of code with all four in
by sago 11y ago
I got asked once "what are the four uses of static in C++". I couldn't recall one (can't remember which one), though I'd shipped a lot of code with all four in more than a decade of C++. He wasn't impressed with my so-called-C++ skills.
I wish I'd asked him what three common words in the english language begin with D and then W, or any three words with just the five vowels in the correct order. I think the chances are good that I could have mocked his so-called-English skills.
These questions, and comp-sci trivia tests, don't test developer ability. I've employed a whole bunch of programmers. The best have been the most agile, creative and curious.
- AdieuToLogic 11y agostatic variables, methods, functions, and linkage IIRC. But the fifth, and most important of all, is race conditions...
- marvy 11y agoI think you're double-counting something: 1) static variables outlive function scope 2) static methods don't get a 'this'. 3&4) static functions have no linkage?? I like your fifth though :)
- AdieuToLogic 11y agoD'oh! I was thinking that it was a trick question and there was a corollary to <code>extern "C" { ... }</code>. I out thunk myself on that one. Which leaves translation unit variables, class variables (which I had erroneously included in translation unit variables initially), class methods, and translation unit functions.
- sago 11y agoIf I remember rightly (many many years ago) that's what he was looking for, and to me I struggled because I thought of the two orthogonal effects it conflates: that of lifetime and visibility. From that I had to re-engineer his four, but put (iirc) translation unit variables and functions together. Anyway, the question was 'tell me what I'm thinking', not 'do you understand C++'. But I think between the two of you you might pass :) I remember he was insufferably smug about how good a question it was for sorting out real C++ programmers from wannabes like me :D I knew then I couldn't work with him.
- chii 11y agoI would ask the candidate how they would solve a particular problem we saw in production. It could be simplified, but i'd like to leave it realistic and un-simplified, and give the candidate clarification when they ask for it (demonstrating that they can think of things to ask without needing to be told). I find experienced candidates tend to do better in these situations, where as candidates that are mostly talk won't be able to.
- jhildings 11y agoI think those are the best type of questions. I read about an interview process here some weeks ago about when the interviewer asked a question like that which could be made both easier and harder depending on the person interviewing. It had to do with parallell threads and things like that for a network application
- scruple 11y agoSo, how do we find employers that want to hire the most agile, creative, and curious engineers? I've long given up on trying to locate those companies, they are unicorns to me after more than 10 years in this industry. When I switch jobs (for the record, that is > 10 years in and on my 3rd employer), I, too, need to reach for my trusty, old algorithms and data structures books and brush up for whiteboard-style examinations and a few rounds of framework/language trivia.
- sago 11y agoThey are unicorns. Mostly it seems to be a people game. I'm fortunate that I've never needed to work so badly that I couldn't be picky about who I work with, so I treat it as a two way interview. All else fails, I can find something to do myself. But condolences on being in the 'real world' described by the OP. Must be both infuriating and demoralising.
- sago 11y agoOn reflection, I want to say more about this. The problem with "the most agile, creative, and curious engineers", is it is like "above average intelligence" or "good sense of humour". Almost everyone thinks they are agile, creative and curious, because - hey - who doesn't want to be those things? So trying to interview for that is like inviting people to show you their bullshit circuits. People who are genuinely agile, creative and curious are as much unicorns as the people who want to hire them. People who think they are among the most agile, creative and curious engineers are more numerous than sparrows.
- locopati 11y agoWhile the original question may not have been asked with the following intention, when I ask a question like that in an interview, I'm not looking for a textbook thorough answer or to comb the minutia. I want a demonstration that you can communicate ideas that you know (even how you communicate in the moment that you've worked with them but cannot recall the fine details on the spot). If you don't know, then I'm looking to see how you communicate that. Saying 'I don't know' is not easy for some people, especially in an interview, but bullshit is pretty obvious. I'm not looking to hire bullshitters. Within all of that, there's plenty of room for agile, creative, and curious responses.
- RogerL 11y agoQuestions like that are like testing if somebody can touch type by asking questions like "which sequence of finger presses would you use to type qWaMvz%e3("? It's not how we normally access the information. I could type that in a second, but it would be a struggle to tell you how to type that. I'd have to put my hands under the desk and simulate typing it to tell you. I'm not against talking about such things in an interview; a suprising number of people that claim expertise in a language have apparently never used it, but the interviewer has to understand what their question is actually measuring. With question like that you are often measuring if their brain can recall information in unconventional ways, or if they read an interview book in the last few days. The old standby that was popular awhile ag: "define OO" - if you haven't memorized the book definition it can be hard to rattle off. Doesn't mean you couldn't have a multi hour discussion about OO, functional, and procedural programming, and more importantly make reasonable and sophisticated design decisions based on your understanding of these things.