|
MrMoo posted:Oh yay I have a five round interview in Philly on Thursday and another five rounder in Manhattan on Friday, and these are supposed to be small startups. One of the rounds is a debugging session which admittedly sounds pretty cool, another one slightly concerning is called a "behavioral interview". Behavioral interviewing is just asking questions like "Tell me about a time you [did something]". It's good if it's done well.
|
# ? Aug 17, 2016 03:01 |
|
|
# ? May 10, 2024 00:13 |
|
ultrafilter posted:Behavioral interviewing is just asking questions like "Tell me about a time you [did something]". It's good if it's done well. Yeah Ive always used the STAR way of answering (Situatuon, Target, Action, Result) helps frame your answer and tick the boxes especially if you remember result includes not only what you learnt but how you then passed your learning on to help others learn as well.
|
# ? Aug 17, 2016 08:19 |
|
3 × interviews in Philly, 1 included CSS questions of all things and coding in Java, another included a dynamic programming problem in C++, and another a complex dynamic programming algorithm for image analysis on a whiteboard. So I asked the CSS interviewer questions about cheesesteak
|
# ? Aug 19, 2016 01:30 |
|
MrMoo posted:3 × interviews in Philly, 1 included CSS questions of all things and coding in Java, another included a dynamic programming problem in C++, and another a complex dynamic programming algorithm for image analysis on a whiteboard. So I asked the CSS interviewer questions about cheesesteak If it doesn't have whiz it's not authentic.
|
# ? Aug 19, 2016 04:37 |
|
leper khan posted:If it doesn't have whiz it's not authentic. Not a believer in provie wit?
|
# ? Aug 19, 2016 04:44 |
|
ultrafilter posted:Not a believer in provie wit? Whiz wit out or
|
# ? Aug 19, 2016 12:02 |
|
4 × interviews in NYC, some dynamic programming in Java but not to worry about the DP bit, something that appears a classic zig-zag array walk on a white board, debugging some Java AWT game-of-life app with way too many off-by-one errors, "have you experienced burdensome colleagues" question session and some chillax time at lunch. I even got an interview phone call on the train home. A lot of interviews using a Macbook Air shared around. Someone decided to set it up with a super high resolution, non-natural scrolling, and Eclipse with the most awful and broken autocomplete popups ever. The CEO apparently dictated that the entire office is grey, grey carpets, grey walls, grey tables, no signage anywhere, at least the dining area has a nice view onto Madison Square Park. Philly cheesesteak history is apparently: cheddar cheese, replaced with provolone as cheddar did not go well with beef, then the prodigal milk product made an appearance later. MrMoo fucked around with this message at 14:23 on Aug 22, 2016 |
# ? Aug 19, 2016 23:46 |
|
Yay, so the results are coming in. One tech interview said to "use any language" in a Python shop so I started with Java and changed course when the problem domain was a high level data structure, to JavaScript and finished quickly. It was clearing designed with Python in mind and I mentioned that as both Java and C++ would have been terrible choices to solve promptly. That was a belated "no". Philly cheesesteak company says "we're going in another direction",
|
# ? Aug 22, 2016 15:28 |
|
A couple more interviews today, a time warp back 10 years. Seriously tenuous questions, like is this valid?C++ code:
C++ code:
The best one was, if you have a single source file app and you add this line to the top will it build and will it run? C++ code:
|
# ? Aug 22, 2016 22:23 |
|
Asking a candidate about the potential consequences of delete this; is a perfectly good C++ question #define struct...not sure where they might have been going with this, maybe wanting the candidate to recognize that #defines are just text replacement so if you and the files you include don't ever use the word 'struct' you'll be fine?
|
# ? Aug 23, 2016 15:00 |
|
csammis posted:Asking a candidate about the potential consequences of delete this; is a perfectly good C++ question A single question ok, but laboring the point in every permutation of usage is just too much. Having coding standards and following them is more acceptable than C++ rule lawyering that some developers love a bit too much. Using delete this; in a constructor is valid apparently but that does not make it not stupid. quote:#define struct...not sure where they might have been going with this, maybe wanting the candidate to recognize that #defines are just text replacement so if you and the files you include don't ever use the word 'struct' you'll be fine? The interviewer was trying to replace class with struct and ask me where it would break.
|
# ? Aug 23, 2016 15:27 |
|
MrMoo posted:A single question ok, but laboring the point in every permutation of usage is just too much. Having coding standards and following them is more acceptable than C++ rule lawyering that some developers love a bit too much. Using delete this; in a constructor is valid apparently but that does not make it not stupid. You can use it anywhere technically, https://isocpp.org/wiki/faq/freestore-mgmt#delete-this I'm not sure its ever a good idea though? quote:The interviewer was trying to replace class with struct and ask me where it would break. Then thats #define class struct And it should always work.
|
# ? Aug 23, 2016 15:33 |
|
hobbesmaster posted:Then thats #define class struct
|
# ? Aug 23, 2016 15:49 |
|
hobbesmaster posted:You can use it anywhere technically, https://isocpp.org/wiki/faq/freestore-mgmt#delete-this You couldn't use it in a non-member function because this isn't defined. Sounds from Mr Moo's response like that's the (bad) question that was being asked. I have written code a couple of times where delete this; was used but each time I ended up redesigning in such a way that it's not necessary. It's unexpected behavior for an object to commit suicide in C++ so IMO it's best avoided unless you absolutely positively can't hold on to an owning pointer with a reasonable lifetime.
|
# ? Aug 23, 2016 15:52 |
|
Plorkyeran posted:It's UB if you include any standard library headers afterwards, and members of classes are allowed to have different name mangling from members of structs. The compiler could also decide to lay out the sections differently. Yes, I meant in your own code compiling your own classes. This is why I screw up interviews! Why can't C++ questions be more like Hashmap vs Hashtable
|
# ? Aug 23, 2016 16:05 |
|
hobbesmaster posted:You can use it anywhere technically, https://isocpp.org/wiki/faq/freestore-mgmt#delete-this It's illegal in a constructor for a type with non-trivial destructor, and in destructors always: 3.8.1 posted:The lifetime of an object of type T begins when: 3.8.5 posted:Before the lifetime of an object has started but after the storage which the object will occupy has been 12.4.15 posted:Once a destructor is invoked for an object, the object no longer exists; the behavior is undefined if the
|
# ? Aug 23, 2016 18:37 |
|
Notably the standard also implies when describing exception unwinding that the object isn't "initialized" until after the constructor body has finished. I didn't find a place that explicitly said that, but I didn't look exhaustively. Imagine what happens if you call delete this in a constructor and then throw an exception after that.
|
# ? Aug 23, 2016 18:46 |
|
hobbesmaster posted:Then thats #define class struct The interviewer was looking for something in templates, e.g. C++ code:
Maybe something like nested templates: C++ code:
MrMoo fucked around with this message at 18:57 on Aug 23, 2016 |
# ? Aug 23, 2016 18:46 |
|
hobbesmaster posted:Then thats #define class struct code:
|
# ? Aug 23, 2016 18:56 |
|
Seems to work with recent clang and gcc:code:
code:
GeneralZod fucked around with this message at 20:40 on Aug 23, 2016 |
# ? Aug 23, 2016 19:44 |
|
sarehu posted:Notably the standard also implies when describing exception unwinding that the object isn't "initialized" until after the constructor body has finished. I didn't find a place that explicitly said that, but I didn't look exhaustively. Is the answer that you'll need to find a new job?
|
# ? Aug 23, 2016 20:00 |
|
MrMoo posted:The interviewer was looking for something in templates, e.g. A struct is a class. Full stop. Take a look at the C++14 standard starting on page 226. You may be surprised at the keywords they use when describing class declarations.
|
# ? Aug 23, 2016 20:10 |
|
hobbesmaster posted:A struct is a class. Full stop. I have walked out of interviews because the lead engineer/CTO interviewing me tried to argue that there were significant differences between class and struct in C++11 other than default public/private. Because that's the only difference.
|
# ? Aug 23, 2016 20:32 |
|
Unions are also classes if we're talking about C++ trivia. I have no idea why.
|
# ? Aug 23, 2016 20:34 |
|
Are companies actually looking to round out their office Jeopardy or pub quiz teams? That's the only scenario I can imagine where hiring people based on how many trivia questions they can get right makes sense.
|
# ? Aug 23, 2016 20:47 |
|
hobbesmaster posted:Unions are also classes if we're talking about C++ trivia. More fun trivia: typedef is a storage class.
|
# ? Aug 23, 2016 21:01 |
|
Steve Jorbs posted:Are companies actually looking to round out their office Jeopardy or pub quiz teams? That's the only scenario I can imagine where hiring people based on how many trivia questions they can get right makes sense. This thread circles the point, but for hiring up to a mid-senior developer/engineer, there's only so much you can do in a limited time to screen a candidate's technical knowledge. I'm currently involved in tech screening for two positions - one a senior/lead, and one a mid-senior seat - and I find that I'm having reasonable success by having a mix of stuff. Some soft "oh hey just tell me about stuff" to get a feel for whether you're bullshitting by putting it on your resume - does your answer to "So tell me about F#" sound like a stack overflow/wikipedia page? But also mixed in some hard technical trivia around the languages - if they're physically present I'll ask for whiteboarded code, but that isn't always possible. I mean, when is trivia *too* trivial? Should a C# developer with 10+ years of experience be able to explain the difference between Reference and Value types and when creating a Value type is appropriate? What about the differences between IEnumerable & IQueryable? Should a developer with 15+ years of experience be able to describe various IOC options, beyond just 'Dependency Injection'? Should a developer with a master's degree be able to be asked the classic "n machines, one is faulty, using only 1-to-1 comparisons how do you find the faulty machine?" question and provide a reasonable answer? Or is that trivia?
|
# ? Aug 23, 2016 22:46 |
|
Cuntpunch posted:I mean, when is trivia *too* trivial? I think if a valid answer to a question is "I don't know, why the hell would you do that in the first place" (as in the case of the "#define class struct" thing) then it is not a suitable interview question. I mean, if it's never going to come up with a sane team writing sane code then why do you care whether the candidate can work out on the spot what would happen? I think the examples of questions you gave in your post are solid, with the possible exception of the faulty machines one.
|
# ? Aug 23, 2016 23:41 |
|
Hammerite posted:I think if a valid answer to a question is "I don't know, why the hell would you do that in the first place" (as in the case of the "#define class struct" thing) then it is not a suitable interview question. I mean, if it's never going to come up with a sane team writing sane code then why do you care whether the candidate can work out on the spot what would happen? I think the examples of questions you gave in your post are solid, with the possible exception of the faulty machines one. You should never do #define class struct, but you should be able to reason about what it would do, because you know the difference between a class and a struct.
|
# ? Aug 24, 2016 00:53 |
|
The thing of it is, though, how much actual programming relies on people knowing bizarre trivia like that?
|
# ? Aug 24, 2016 01:24 |
|
In C++? A surprising amount!
|
# ? Aug 24, 2016 01:37 |
|
ToxicSlurpee posted:The thing of it is, though, how much actual programming relies on people knowing bizarre trivia like that? Like, I definitely needed to have been able to know to question whether calling "delete this" from a constructor might be a terrible idea, because that's a plausible thing that makes sense to do, if not for exceptions and the possibility that you aren't the bottommost subclass. I've done it from a member function of course, and reasoning through whether it works from a const member function is just trivia about whether you deleting a pointer to const object in general will compile. Of course there's other gotchyas like virtual destructors, the rule of three, explicit constructors, exception safety, and C gotchyas, that are more mundane stuff that you have to know.
|
# ? Aug 24, 2016 02:18 |
|
hobbesmaster posted:In C++? A surprising amount! Yeah, things which sound like useless C++ trivia turn out to be relevant far more often than you'd hope.
|
# ? Aug 24, 2016 04:02 |
|
Plorkyeran posted:Yeah, things which sound like useless C++ trivia turn out to be relevant far more often than you'd hope. I'll admit that's a fair point but I haven't written C++ since college. C# and Java have spoiled me.
|
# ? Aug 24, 2016 05:10 |
|
C++ has probably crossed the threshold where it's more bullshit trivia than a language at this point. The rabbit hole of nonsense goes on seemingly forever.Cuntpunch posted:This thread circles the point, but for hiring up to a mid-senior developer/engineer, there's only so much you can do in a limited time to screen a candidate's technical knowledge. I'm currently involved in tech screening for two positions - one a senior/lead, and one a mid-senior seat - and I find that I'm having reasonable success by having a mix of stuff. Some soft "oh hey just tell me about stuff" to get a feel for whether you're bullshitting by putting it on your resume - does your answer to "So tell me about F#" sound like a stack overflow/wikipedia page? But also mixed in some hard technical trivia around the languages - if they're physically present I'll ask for whiteboarded code, but that isn't always possible. Trivia is pointless because you're not getting much if you hire someone whose main selling point is not having to do two second google searches. As weird as C++ is, once you get a vague understanding of the rules you can make fairly reasonable assumptions about performance and memory and you can easily verify your assumptions by looking at the assembly it generates. You can just bang on a lot of things until they come out how you want them to. Rather than ask trivia you can ask more senior people about projects they've worked on, the complications they ran into, and how they solved them. You're giving them a prompt, a ton of rope, and an opportunity to hang themselves or not. You can work even if you personally don't have a great understanding of the platforms they were working on.
|
# ? Aug 24, 2016 07:53 |
|
b0lt posted:You should never do #define class struct, but you should be able to reason about what it would do, because you know the difference between a class and a struct. If you want to determine whether the candidate knows the difference between a class and a struct, why not ask them "what's the difference between a class and a struct?"
|
# ? Aug 24, 2016 09:20 |
|
Hammerite posted:If you want to determine whether the candidate knows the difference between a class and a struct, why not ask them "what's the difference between a class and a struct?" Because this tells you if they know what #define is, and their comments on the line of code beyond the immediate answer can provide additional insight into their practical experience?
|
# ? Aug 24, 2016 09:28 |
|
return0 posted:Because this tells you if they know what #define is, and their comments on the line of code beyond the immediate answer can provide additional insight into their practical experience? Well, okay. I feel like if you want to test the candidate on whether they know how the preprocessor works you have better ways of doing that than asking them stupid questions. Like for example, you could ask them what's wrong with this: code:
|
# ? Aug 24, 2016 11:53 |
|
Hammerite posted:Well, okay. I feel like if you want to test the candidate on whether they know how the preprocessor works you have better ways of doing that than asking them stupid questions. Like for example, you could ask them what's wrong with this: What is wrong with that?
|
# ? Aug 24, 2016 13:10 |
|
|
# ? May 10, 2024 00:13 |
|
qntm posted:What is wrong with that? There are probably other examples, but try: code:
For further fun, try: code:
GeneralZod fucked around with this message at 13:37 on Aug 24, 2016 |
# ? Aug 24, 2016 13:18 |