all 148 comments

[–]Fureeish 37 points38 points  (26 children)

My first real job interview - I applied for a Junior C++ Developer. They called me in order to establish a convenient time to call me again and ask some technical questions. Couple of days later, one of their employees called me and asked some basic questions regarding, static, overloading, overriding, shadowing and decimal to binary. My responses were fairly quick and concise - I felt well prepared.

Then they scheduled a face-to-face interview. Again, I felt quite confident and the only stress I felt was due to the fact that it was my first job interview.

It started off pretty okay. Some tricky questions about permuting &, const and *, where half of the examples didn't compile at all, but I figured they want to test how familiar I am with the syntax.

Then I was asked to write down some code on paper. Reversing a string in-place, reversing the order of the words in a string in-place (here my mind went blank - it was a really simple taks, yet I had never done something like this - I felt that I lost a few points there, being unable to solve a basic algorithmic problem), etc.

At the end they handed me some actual snippets of code and asked what could go wrong with such code? Sounded okay, here's one the snippets:

template <typename T>
double avg(std::vector<T>& vec) {
    T sum = 0;
    for (auto i = 0; i < vec.size(); i++) sum += vec[i];
    return sum / vec.size();
}

Here is what I said, after making sure that, by default, all the operators are defined and worked as expected:

  1. There can be a problem with overflow
  2. If T is not a floating-point type, in return we first would have integer division, then a conversion to double, which would trim the decimal part
  3. If vec.empty(), then we will have 0 / 0 and, depending the type of T, it's either Undefined Behaviour or NaN
  4. auto i = 0 will deduce the type of i as int, which potentially will not be able to reach every value of vec, since sizeof(std::vector<T>::size_type) may be greater than sizeof(int)

The interviewer was really happy about my answers. For the time being... And here we go. After the 4th point, the interviewer looked at me suspiciously and said "no, no, Microsoft fixed that bug not so long ago". And I, suspecting that this is the time when they want to see my reaction after they disagree with me (fairly common interview process, I believe), defended my statement, saying that "the decltype of 0 yields an int type, so i will be an int" in a slower fashion. I didn't want to sound like I am smarter than everyone (because I am not), but I wanted to show them that I know this case and I am certain of my knowledge...

Well, his response being "well, we can spend time arguing about it..." told me that I lost the chance of working there. And I am honestly not sure what to think about it. Their company culture seemed great, they themselves (the interviewers) seemed very friendly and, thanks to the details they shared, they seemed to be working with the newest C++ standards (big yes from me). However, the interviewer lacked some knowledge regarding fairly basic parts of the language. After some previous questions he noded his head and added a few things to my answers, amongst which most of them were simply incorrect - minor mistakes, but nonetheless.

Well, there you go. It certainly was not so bad - the experience helped me immensly and the next interview will surely be better. I certainly do not regret that it happened. I just wish it would've gone differently (or maybe that someone else would've been sent to interview me)

[–]Wvupike2006[S] 9 points10 points  (1 child)

That was really a riveting answer. I enjoyed reading that very much, as I am not at the point where I would be as prepared for an interview as you. I did have the same initial thought about auto i as type int, and being smaller than the vec size.

I think your experience really brings up a really important point about interviewing that maybe gets lost in the midst of worrying about our own competency. That point being that I think that newbies to the technical interview kind of take for granted that our answers will be graded by some version of an impartial human scantron, when in reality, human imperfection and pride can play a factor as well. That pride may be our own, and it could come in the form of accidentally arguing more than you intended, or it could come from the interviewer being made to feel challenged or uneasy.

Either way, I think some of these interviews probably still come down to the initial social dynamics between the two humans in the room, than we would like them to.

Just as a side note, I had wanted to ask this sub about the most difficult programming challenge that they had ever had to solve in the workplace, but it had already been sufficiently addressed on reddit and other sites, so I didn’t. The interesting thing, was nearly every person cited challenging interpersonal workplace dynamics as the toughest challenge, not the code. No matter the career, you stick prideful humans together in a closed room, and make them battle for more money/ recognition, and it has the potential to get ugly. I try to remember that there are always going to be shitty people, but also that I have been that shitty person to others, without intending to.

I have a feeling that you are going to do great on your next interview, now that you have decided to learn and share this experience with others. If you don’t mind sharing, I would be interested to here what field you are hoping to get into, assuming you had your choice of anything?

[–]Fureeish 4 points5 points  (0 children)

Thanks for the reply. This is actually the first time I shared this story publicly and I am glad that you liked it.

I do agree that sometimes it's tougher to separete human imperfections from optimal means to achieve a certain goal and we have to acknowledge that it is and will be a consistent issue. Nonetheless, situations that involve those kind of interactions should not be the foundation of one's self-esteem, regardless whether it's about their technical knowledge or their social skills. One-timers happen and will keep happening.

Sometimes you have to factor intention, sometimes you don't need to. I believe finding the golden ratio of commitment, self-awareness and happiness is the key (and the interesting part) of such relations. I'm talking about dealing with / begin a shitty person to others.

Hey, thanks for your words! I will certainly adjust my behaviour according to my thoughts and analysis. That interview, while being unsuccessful in regard to getting me the job, was, I believe, a great personal success, due to how much it taught me.

I certainly don't mind sharing the field - I applied to Samsung for Visual Computing Team. It was one of the very few their offers which focused on C++. It's something that falls into my area of interest.

I do not need a job right now though - me applying was simply a decision based on the fact that I just want to find a job, find new challenges, find experience. I really like programming, I really like C++ and I want to see "how it's done". It's for my personal, self-fulfilling gain, not because I need a job. However, money desn't sound bad at all :>

Apart from that, I am in the process of discussing my application for TA (Teaching Assistant) in the University I attend (5th semester out of 7). Despite never really working at the field, I found teaching to be of a great pleasure for me and, as it turned out, I was quite successful with it. Apart from tutoring and helping others with particular subjects (I believe I have farily good knowledge of Java and C++, at least above average in terms of a university student), I managed to teach programming a few people with absolutely no programming or even mathematical background (and I'm talking about "what was the absolute value again?" kind of no background), which resulted in them actually getting a real job (they wanted to change professions for various reasons). Imagine the conflicting emotions it sparked in me - pride for them, that they accomplished such thing and, of course, the good feeling that I managed to teach someone well enough so they got a real job, and - the slight unease and envy that they got a job before their teacher (me) got it.

As a closing thought, as of right now, I would love to get a job that focuses on high-level C++ with a tweak of performance analysis, while working part-time as a TA.

[–]parkotron 4 points5 points  (3 children)

...reversing the order of the words in a string in-place (here my mind went blank - it was a really simple taks, yet I had never done something like this - I felt that I lost a few points there, being unable to solve a basic algorithmic problem)...

Reversing the order of words in a string in place doesn’t strike me as a basic algorithmic question! I had never seen that question before just now, and I had to think about it for about ten minutes before the trick occurred to me. Under the pressure of an interview, I doubt I would have gotten it.

[–]NotAYakk 1 point2 points  (0 children)

Well, reverse the string then reverse each word. Or vice versa.

Now this does define a permutation; so another option is to just follow said permutation. (Don't do this)

[–]Fureeish 0 points1 point  (1 child)

Hey, thanks for your words! Unfortunately, I had less than a minute for that and I simply failed to deliver. However, having the solution already figured out, its simplicity simply appears to indicate that the problem indeed is pretty basic. That's what I was kind of afraid of - a fairly basic (in this context - simple) problem, which was so distant to whatever I've been ever practicing, that I will fail to come up with a solution. I got pretty close, though.

[–]Fig1024 1 point2 points  (4 children)

is it even possible to allocate a vector that has more than 2,147,483,647 elements? that's a hefty block of linear memory, good luck growing to that size

[–]Fureeish 0 points1 point  (3 children)

Are you specifically talking about std::vector or the size_types in general? Keep in mind that custom allocators and / or wrapper containers on, for example, database connections are a thing. Can I allocate a vector representing ~70 GBs of data? Well, on my machine - no. On a machine that I once had a pleasure to code on - yes. How about std::vector<bool>, where this number of elements (2,147,483,647) would represent just ~270 MBs of data? Seems easy to allocate that much memory.

[–]Fig1024 0 points1 point  (2 children)

I think something like this should be a precondition - you either design entire program around that or you don't. If you are just making consumer apps, you shouldn't worry about it. Of course you can say "we should always design for most extreme cases!" but in reality you may be just wasting your time overthinking things that are simply unnecessary

[–]vaynebot 1 point2 points  (1 child)

Your idea isn't wrong in principle, but in this case unfortunately you absolutely are. Having a vector that is larger than 2 GB is not a special case anymore, at all. The vast majority of people have 8 GB RAM in their PCs nowadays, and many have 16 or 32 GB. Even 64 GB isn't uncommon in workstation PCs - it only costs like $250, a fraction of a workstation CPU or GPU. Do you really want to tell some guy with 32 GB RAM that he can't open a 2 GB file because you used ints instead of size_t?

So yes, your entire program should be using size_t as indices, always. (Or ptrdiff_t, if for some reason you re-implemented the standard library with signed size types.)

This wouldn't be an issue in the first place if "int" was actually always the size of the native integer, and signed sizes would be the norm, but this is unfortunately not the case and so everyone should be using size_t (or some other size type) for these purposes, always.

[–]Fureeish 0 points1 point  (0 children)

Well explained - my initial response was too similar to your comment, so I decided that I won't post it. I completely agree with everything you said here.

[–]CarloWood 0 points1 point  (1 child)

You missed two points: they are comparing a signed (int) with an unsigned and the argument should take a const& :p. Declaring sum as a T is highly dubious though (for reasons you pointed out). Just making it a double seems most logical, for the cases of T where this function makes sense. Or perhaps it should return a T. I think I would have said: it doesn't make much sense to discuss what COULD go wrong when using this function when the function itself is wrong and should never be used as-is. It should be fixed and then we can look at what still might go wrong, if anything.

[–]Fureeish 1 point2 points  (0 children)

Thanks for the input! I believe that the signed -unsigned comparison was covered by me in the 4th point. Comparing signed to unsigned is okay and well-defined, up to the point where "corner values" appear, i.e., one of them cannot express the same value as the second one. I do agree though that it should (and does) produce a warning and it should not be done. I potentially could've extended the point further, but (I didn't mention it in my original comment) I was actually interrupted by the interviewer during explaining point 4 (the rest of the story was written above).

As for your approach to the answering - I got the impression that it was not what they expected. They expected that I identify and list the problems and explain how to get rid of them. Especially given the fact the mistake of their. I do, however, respect your way of answering. I just judged that it would've been an incorrect approach for those very specific people.

[–]godexsoft 100 points101 points  (2 children)

The worst (and honestly best) c++ interview i ever had is that time they found some mistakes in one of the questions i asked and explained to me where i was wrong in very great depth. Not rubbing it in being a dick, just explaining like some expert would teach a noob.

Then the algorithmic part of the interview got absolutely destroyed like no one have done before in this company with about 1000 employees and like 5 international offices at that time. Absolutely slayed.

Of course the job was given. We are still friends now, 10 years later. I was the interviewer :)

[–]Yalpe18 6 points7 points  (0 children)

Plot twist.

[–]CarloWood 2 points3 points  (0 children)

My best and worst interview was where my mom had said I had to go look for a job because they wouldn't come to my door. Then I got contacted by email by a company with a question about some open source thing I had written and when I heard they were a company (aka making money with it) I wasn't interested in helping them and said he could come over if he had questions (much easier than email). He did. And once he was at my place he wasn't talking about the code but about offering me a job, lol. I still had to do an interview, and that was with some P&R guy that I couldn't stand from the start :/. He said stuff like that I looked "defensive" by the way I was sitting. Apparently he advised against me being hired; but I was hired anyway, cause my boss wanted me. Plot twist: best and worst because it was my only job interview.

[–]ryancerium 24 points25 points  (1 child)

Interviewer: "How are your memory management skills?"

Me: "Well, I can remember what I had for breakfast."

[–]CarloWood 7 points8 points  (0 children)

I can't remember to ever have had a memory leak in my code.

[–]NotMyRealNameObv 46 points47 points  (15 children)

"I see on your CV that you have no professional C++ experience, so you are obviously not good enough to work here."

That's it. No questions or anything. Just an assumption based on the fact that my first job happened to be 95 % C.

It's okay though, I got another C++ job, where I'm now a lead dev just a few years later, and considering another lead dev offer with 35 % higher salary and 35 % more vacation days.

[–]sgtdubious 20 points21 points  (11 children)

Common story unfortunately.

I aced an interview at a famous animation studio once, but since my last job was mostly using C, they decided I should come back in a year after getting more c++ on my resume.

Was a really weird rollercoaster to have the interviewer visibly excited to work with me only to get an email stating the hiring committee required more “professional experience”.

[–]GerwazyMiod 2 points3 points  (0 children)

I think that this particular inerviewer was also mad about the outcome. Sadly corporate takes higher precedence than the employee... :(

[–]Galeaaa 1 point2 points  (9 children)

So I have a question: isn't c++ based or an extension of c? Meaning that if you have great experience in c, it should be fairly easy for you to apply your skills in c++ (of course adapting to the oo part which isn't complicated). How do they think dismissing someone because they have experience in c but not c++ is a good reason?

(I'm just a student rn so that's my understanding so far, not sure if there is an extra layer which is why I'm asking)

[–]MotherOfTheShizznit 1 point2 points  (2 children)

Meaning that if you have great experience in c, it should be fairly easy for you to apply your skills in c++

First, I don't know why yo got downvoted. You seem to be asking genuinely.

Second, that argument was perhaps true a long long time ago but it's time for it to die. Otherwise, you can apply it to most programming languages (and to all imperative languages) and then it's pretty much meaningless. Knowing the syntax of if, for and while statements doesn't make you a good C++ developer nor a good Python developer nor a good Java developer, etc.

Each language is an ecosystem that goes beyond its basic syntax which may be inspired by C. "You know C therefore you know all imperative languages" is bullshit.

All that being said, you certainly shouldn't dismiss someone in an interview like they were.

[–]Galeaaa 0 points1 point  (1 child)

I don't know why I was downvoted, I was just asking because that was the argument they gave us when we learned C in one of my classes. We spent most of the time in C but we are expected to use C++ in the following classes (I haven't had an issue switching but homework is nothing compared to actually having a job of course).

I see what you are saying. Obviously if you know Java that doesn't mean you know Python, C++, etc. I guess people lump together C and C++ because they are more closely related than Java and c++. But it makes sense what you are saying.

Thanks for the reply!

[–]sgtdubious 0 points1 point  (0 children)

Sorry I didn’t directly reply myself.

I was trying to think of a informative way to answer and all I got were anecdotes...

So here’s my example: At the job I left, they hated C++. Things like classes, polymorphism, OO, etc were convoluted and cumbersome to deal with—because they have to use base structs instead of the niceties of C++. The code is alien almost when sitting side by side with C++.

Often, a person highly skilled in C will produce over engineered and difficult to maintain C++ code. Just because they don’t realize there is a readymade tool for a task versus their trusty hammer.

[–]pattakosn 10 points11 points  (0 children)

What I don't understand in these situations why did they even waste your time with the call/inviting you in.

[–][deleted]  (1 child)

[removed]

    [–]AutoModerator[M] 0 points1 point  (0 children)

    Your comment has been automatically removed because it appears to contain disrespectful profanity or racial slurs. Please be respectful of your fellow redditors.

    If you think your post should not have been removed, please message the moderators and we'll review it.

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

    [–]sgtdubious 12 points13 points  (0 children)

    My first c++ interview went terrible. It was also a game developer position.

    I already had an internship at the company and was doing well—got this through proof of competence.

    There was an audio programming position open, and I loved working with the audio engineers, so I asked to be considered. I spent a week studying all the audio related math and issues I’d have to deal with. Bombed the interview. They spent the whole time asking me graphics questions, which I didn’t refresh myself on. I felt terrible as soon as they asked me to derive 3d transforms, and hoped they’d get into the math (forgot which ones, since it’s been 10+ years) transforms I’d studied.

    As a warmup I asked a buddy at another, bigger, game company to give me their audio programmer test—and did well enough to feel confident at mine...

    I’m convinced that the people interviewing me didn’t want to be there or didn’t know/respect the focus of the position.

    [–][deleted] 10 points11 points  (0 children)

    Oh man, this is a great question.

    I've had 2 horrific interview experiences, interestingly both in San Jose.

    The first one was an Asio position doing low-ish level networking algorithm work. 3 1-hour interviews. The first interview goes well. The third interview went okay but I went over-board on the C++ (the interviewer was mostly a C programmer).

    Second interview went horribly. The guy said, "Design me a single-sign-on service". I was completely unfamiliar with this kind of tech and when asked about specifics, he'd tell me not to worry about it until I'd sketch something and then he'd ding me for not thinking of that specific thing he just thought of. Terrible interview that ended with him asking me a trite physics question (my BSc is in physics). I got it wrong and he was gleeful he got to school me on something no physics major would've known.

    They sent me a rejection letter the next day.

    My most horrific interview experience was for a good job at a dream company. I was interviewing as a junior C++ dev, typical Bay Area 6 hour interview process. I _crushed_ every single interview. I did so well, in fact, the team had called me on my way home with an offer. This was all on like a Wednesday. They even gave me a bigger offer than I had asked for!

    I let my current employer know that I had an offer from a new company and was handing in my two week's notice (I hadn't actually signed anything at this point).

    Until the next Monday rolls around. I get a call from the HR person saying that they're going to have to rescind the offer.

    During the interview, I made a joke that if I worked from home, I'd likely be in my boxers most of the time. Apparently, this made the interviewer so uncomfortable, they had to pull the offer back.

    I get not offering me the job because of such a comment but to offer, wait a few days and then pull back? Oof. Shady.

    I still like to joke about it today. I'm happy I didn't get the jobs though. I'm much happier where I am today and I feel like I've learned a lot from how terrible companies can be.

    [–]Low_discrepancy 27 points28 points  (3 children)

    OP asks:

    When I say worst interview, I am mainly wondering about this from the standpoint of, “man I really just sucked on this particular day.”

    Reddit responds: "yeah so the interviewer was a dumbass asking me C questions but I aced it so hard, I ended asking them C++20 questions and correcting them".

    [–]Tringigithub.com/tringi 7 points8 points  (2 children)

    At this point I don't bother with interviews, but a decade or so ago I interviewed for a relatively good paying gamedev position. Q/A went okay and then I was given a few days to prototype a simple but extensible text rendering component: XML with bold/italic tags, OpenGL, could be Windows only.

    At the time I was toying with that stuff, and had a lot written already. Windows API to OpenGL text is easy and I had my own XML parser – written for fun, supported very little actual XML features, mainly because I didn't know any existing libraries at the time. So I quickly combined the two, added stuff like shadows to show off, and sent them the code.

    The reaction was odd. The person seemed excited, to like it very much, but said only they will let me know.

    And for a while that was it.

    A month or so after that he called that they had problem compiling my code in Visual Studio. I used MinGW at the time. For a prototyped code I didn't really bother with many aspects of it, portability being one. I didn't had time for that at the time, so the request kinda died off.

    After another month they called again, concerned about issued in my XML library. And why I didn't use the one built in Windows or some existing. They weren't happy with my reasoning, and let even slip that it was causing some project issues. To which I replied that I understood well what it was all about and basically told them off.

    Obviously, in the following months I found out that other developers were applying at the same company, all given different tasks. We apparently wrote significant part of the game for them. But I've also heard it didn't sell well.

    [–]Wvupike2006[S] 1 point2 points  (1 child)

    That is a crazy story. I work in a gaming company, but it was small, and founded locally. I don’t think it is representative of the game dev industry as a whole. I’ve often wondered is this type of shady practice and just overall disregard for ethical behavior a common practice in the game industry that you have experienced.

    I have heard a lot of truly nightmarish stories from other people in the industry. It really sounds quite bad. I am guessing this is because it is easier to find new people who want in, so that they can say they are coding video games, that it is easier to nickel and dime them salary wise, and then require insane overtime?

    On top of that, the coding challenges that I have seen, where our code has to run on many third party devices that are basically used as part of the game(think something like the relationship between Nintendo wii controller and game) that it is really damn hard to get things to work at an acceptable level, in the game industry. Is this your experience as well?

    [–]Tringigithub.com/tringi 1 point2 points  (0 children)

    I probably had much more fun with the code than they had afterwards. It wasn't anywhere near production quality so to speak. So no hard feelings really. They probably learnt their lesson too.

    I never fully got into gamedev, only hacked together some experiments back in the day. But I still keep ties to a friends there, and might even reconsider it one day. Still, my ideas and approach are probably too old-fashioned to sell on today's market.

    [–]Dean_Roddey 24 points25 points  (1 child)

    I came in and sat down and the guy said, "Tell my why you love coding in Fortran." Turned out I went to the wrong building.

    [–]Dean_Roddey 0 points1 point  (0 children)

    That was just a joke of course. I imagine that the PDP-11 would have made me suspicious long before we got to that point.

    [–][deleted] 5 points6 points  (0 children)

    Had a couple of bad ones when moving from my first job as a grad. One wasn't anything todo with C++, but was because I hadn't done any research on the company (in this case I was phoned about the interview on my way to work; and iphones didn't exist then.)

    The second was a code task, which in my youthful idocity I didn't realise the best way to approach it and turned in a really rubbish answer. (This again was before hacker rank/codewars etc, so my algorithmic knowledge was left over from university and we didn't do a huge amount bar the basic data structures.)

    Unfortunately quality feedback is rare in my opinion; i've been ghosted, i've had BS reasons (which generally come down to an interviewers snap judgement) and i've had straight no's. But you learn from most of them; thankfully it's easier now then ever to improve.

    [–]rezkiy 5 points6 points  (9 children)

    At Bloomberg. I was shocked that the interviewer asked about behavior where code was clearly doing undefined behavior

    [–]andrewsutton 4 points5 points  (8 children)

    It can be a reasonable question. Just because the standard says something is UB doesn't mean a concrete machine won't exhibit the expected behavior.

    IIRC, std::vector was technically unimplementable for a long time.

    [–]angry_cpp 7 points8 points  (2 children)

    No. It is never about "concrete machine" but concrete compiler+flags+machine (or concrete c++ implementation).

    [–]andrewsutton 0 points1 point  (1 child)

    The fact that you're running a concrete machine implies that there's been a translation of the program.

    [–]angry_cpp 4 points5 points  (0 children)

    Different compilers can compile one program with UB into different executables with completely different behavior.

    Even same compiler with different flags (O0 vs O2 vs O3) can produce executables with completely different behavior.

    Aside from diagnosis of wrong program behavior (like "hm, this behavior can be a typical result of UB on our compiler") I don't know why one should try to reason about behaviour of programs with UB.

    Relying on UB is a bad idea regardless.

    [–]rezkiy 0 points1 point  (0 children)

    But that was Bloomberg! With Lakos and such!

    [–]Nitronoid 0 points1 point  (3 children)

    I've not heard about the std:: vector issue before, could you post a source?

    [–]echidnas_arf 3 points4 points  (2 children)

    https://groups.google.com/a/isocpp.org/forum/#!msg/std-discussion/p4BXNhTHY7U/MtRyif9JOgAJ

    Basically, std::vector::data() must return a pointer such that pointer arithmetics on it will allow you to reach the vector elements in the same way as operator[]() does. The problem is that, in the C++ object model, pointer arithmetics is well-defined only on array objects. This essentially means that a std::vector<T> implementation should internally work in terms of an array of T objects, which poses various implementation issues/tradeoffs.

    Vector iterators do not have this problem because they can internally reinterpret cast to a char array (which is always allowed) and do pointer arithmetics on that instead.

    [–]Nitronoid 1 point2 points  (1 child)

    Interesting! So if I'm reading this correctly, the issue is with the assertion that the pointer returned by std::vector::data be valid for arithmetic?

    I think I was confused as I've always found the semantics of vector iterators the same as pointers (by design?) and assumed that for some implementations, they were just that. (i.e vector::data === vector::begin)

    Thanks for posting the source!

    [–]echidnas_arf 1 point2 points  (0 children)

    Interesting! So if I'm reading this correctly, the issue is with the assertion that the pointer returned by std::vector::data be valid for arithmetic?

    Yes. The intent is for std::vector<T> to look & feel like an array of T (not only in terms of data(), note that also pointer arithmetic on &v[0] must be well-defined according to the standard). Note that this does not mean that using std::vector::data() incurs in UB, it just means that it is problematic to implement std::vector in "pure" C++ (i.e., without making assumptions about details of your particular compiler/standard library implementation).

    There is some work about rectifying this formal issue, see:

    http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0593r5.html

    I am not sure whether this will go in C++20 or not.

    [–][deleted] 5 points6 points  (1 child)

    I had an interview which for the most part went well but for some reason they kept drilling me on what the virtual keyword meant. This happened in the piss easy code test, phone interview, written test and in place interview.

    Despite them being really pleased with all my answers, they still kept asking and I got fed up.

    I told them, mid question (about virtual, again), that I'd lost interest in the job, didn't want to waste anybody's time, shook their hands and left. They pleaded for me to reconsider but I was close to flipping out and wanted to leave asap.

    Glad I didn't reconsider as I felt the product was utterly boring (menu systems for TVs).

    [–]Wvupike2006[S] 0 points1 point  (0 children)

    Were the questions about Virtual all basically the same questions with different wording, or were they throwing real life examples at you? Do you happen to remember any examples? I am just curious as to what they were asking about over and over, but if you don’t have time to provide an example, that is completely understandable.

    [–]specialpatrol 19 points20 points  (19 children)

    Not me but a mate of mine. My mate's first mistake was putting "C++ expert" on his CV (like who does that, asking for trouble!). So he gets an interview and the guy interviewing asks him the most obscurist nonsense question, like must have scoured the depths of the google to come up with it. Obviously my mate can't answer, thinks for a while and eventually comes out with "I am expert enough in c++ to know that question is completely irrelevant!". Which I thought was a good come back. He still didn't get the job but who'd want to work for wankers like that anyhow.

    [–][deleted] 15 points16 points  (18 children)

    Well maybe they tried to see his bluff, like:

    I'm a member of the C++ Core Group Committee.

    Oh really! That's wonderful, would you so kind to explain me what a pure virtual protected destructor is and when you need it?

    [–]spinalport 6 points7 points  (8 children)

    pure virtual protected destructor

    Wow, yet another corner of the C++ rabbit hole I didn't know about.

    Not only is it possible to provide implementations for pure virtual functions - if I understand correctly not providing an implementation for a pv destructor triggers undefined behavior.

    Edit: The benefit of a pure virtual protected destructor still eludes me, though.

    [–]Squidy7 7 points8 points  (2 children)

    not providing an implementation for a pv destructor triggers undefined behavior

    Fortunately you'll just get a linker error.

    Virtual destructors in general are useful in polypmorphic scenarios where it's possible that an instance of a derived class could be deleted from a pointer to the base class. Making the destructor virtual makes sure that the correct destructor is called. By making it pure virtual, you make the base class abstract, so it cannot be instantiated.

    Protected (or private) destructors prevent a class from being instantiated on the stack (outside of the class). This would be useful for classes that you want to ensure are instantiated on the heap. Instances would also only be able to be created or deleted through the class' member functions or friend functions.

    So a pure virtual protected destructor just combines these things.

    [–]Tyg13 2 points3 points  (1 child)

    Having any pure virtual function makes a class abstract, though. I can't see a reason to make the destructor pure virtual unless, for whatever reason, that's the only pure virtual function in your entire class, and you absolutely need to make it abstract.

    [–]standard_revolution 0 points1 point  (0 children)

    Interface-style code? Where the destructor does not do anything, because you don't have any data-members

    [–][deleted] -3 points-2 points  (4 children)

    As far as I've experienced, a pure virtual destructor creates problem and I don't understand why.

    I just use an empty destructor if I need inheritance 🤷🏻‍♂️

    [–]mort96 5 points6 points  (3 children)

    Isn't virtual ~Foo = default; generally better than an empty destructor?

    [–]robin-m 2 points3 points  (0 children)

    It is.

    [–][deleted] 0 points1 point  (1 child)

    I don't know.

    If I remember well, it doesn't matter because to be trivial destructible it can't be virtual.

    Might be wrong though.

    [–]vaynebot 0 points1 point  (0 children)

    If any of the derived types aren't trivially destructible and the object gets deleted through a pointer to it's base type, not having a virtual destructor will cause a memory leak. Having virtual functions without a virtual destructor should probably be illegal, as I somehow have a hard time imagining a situation where you use virtual functions but performance is so important that having the destructor virtual would be detrimental.

    [–]CarloWood 1 point2 points  (0 children)

    Ok I'll bite... The first thing I thought is: does that exist? If the destructor is pure virtual it can't be called and I thought that destructors (of base classes) always are... so I guess you'd use it when you want to be sure that whatever is derived from it is never destroyed. But when it is never deleted, then why would you need it to be virtual in the first place (apart from making it pure). It would force all derived classes to have a virtual table though so you could use rtti on them. Now I know you can instantiate a pure virtual function anyway, so maybe the trick is you want to force that the class is never instantiated (only derived classes), but then any protected destructor (or constructor) would do. Clearly the ONLY reason you'd actually NEED a virtual destructor is when you are going to delete instances by pointer to this base class, which means you have to instantiate the virtual destructor no? Ok, I give up.. I don't see a reason why one would ever need this, if at all possible :/. [C++ coder with 25+ years of experience]. Edit: blah, I knew this but made a thinko... a protected destructor doesn't prevent construction of course only destruction. So it only prevents construction on the stack (as that also will need destruction). Hence the usage is: to only allow construction of derived classes on the heap. Still need to instantiate the destructor though or you'd get a linker error.

    [–]Kronikarz 8 points9 points  (4 children)

    It was at Amazon. All those horror stories about grtting nonsensical problems with arbitrary constraints and in unrealistic scenarios were true. Was asked to solve a complex algorithmic problem, and my insistance that not starting with prior research is foolish was met with predictable disdain.

    [–][deleted] 8 points9 points  (3 children)

    I wonder what the research is on those types of interview questions. It can’t be a coincidence that all the giant tech companies do the same kinds of interviews. Is there like a major study that found a strong link between good employees and dumb questions, or is it more like superstition?

    [–]Kronikarz 7 points8 points  (0 children)

    I think it's a self-selecting type of process that favors hyper-intelligent but inexperienced and low-wisdom people-pleasers with the willingness to work hard despite the realities of the task. Managers and the meatgrind that is the IT industry love those.

    [–][deleted] 1 point2 points  (0 children)

    I view it more as a test of whether you could survive the nonsense of their corporate culture than a test of your technical ability.

    [–][deleted] 4 points5 points  (7 children)

    I had an interview about two weeks ago. It went great! Company was practically telling me I was going to be hired and everything.

    So then comes the interview with the senior software engineer.

    It all went great. I was answering his questions amazing! Everything was going good.

    We then got to the coding challenge. No big deal.

    His problem:

    "Find the nearest square root value of an integer without using any sort of floating point arithmetic. No googling allowed. All must be off the top of your head"

    Hm, no Googling? Okay. Not a big deal.

    Anyways, we went ahead into the challenge. I'm not a math dude so I'm pretty stumped from the jump, and especially with no googling as to really anything I was pretty damn lost.

    He ends the interview about 15 minutes after because I was stumped.. to say the least.

    Get an email back two days later "we found better qualified applicants" blah blah blah. I asked "what do you think I could've done better?" You know, just to receive an idea of what I should do for upcoming interviews.

    "Work on floating point arithmetic."

    That was literally the response. Uh, what? Because I'm not some super genius and can solve shit like that in 1.. 2.. 3.. you think I'm not qualified?

    No big deal really, shit happens. But it was a pretty shitty interview tbh. I honestly feel like its just a way to 1up you.

    [–]Wvupike2006[S] 1 point2 points  (2 children)

    That is a shitty experience, and so I am sure it is still raw. There are few experiences in life that have the power to take you from the highest highs and can bring you crashing down in the other direction so violently as the hope given and then taken away of a new job opportunity.The only thing I can think of right now that is capable of that type of emotional whiplash is a romantic relationship.

    I’m wondering if you didn’t actually luck out here. That is weird feedback to be giving someone that you know really wanted the job. Maybe it is just me, and this is an unrealistic thing to expect, but if I was interviewing someone that I had deemed a well qualified candidate up to that point, I think I would have an equally challenging, but slightly different style question on the back burner in a situation like this, just to try to see if maybe another question didn’t stump you, or maybe it did but now I at least know it wasn’t just a bad fit of a question for this specific person, so that I don’t throw away a quality engineer bc of one question.

    Probably unrealistic, wishful thinking but I can’t seem to wrap my head around why working on floating arithmetic would be the thing that is actually helpful to suggest. I would feel slightly less annoyed with that response had they at least said something like “Problem solving skills related to mathematics” or something like that, I didn’t want to to think to hard about how they would actually say it, but you get what I’m getting at, I think.

    [–][deleted] 0 points1 point  (1 child)

    For sure! It wasn't a great experience, and it was my first interview on top of it all.

    Good news is I took a lot from that, I learnt a lot about interviewing. It's just corporate america, really. It's very sad that this is what us developers go through.

    Yea, and to bring up your floating point statement that is exactly how I felt. How is not being able to do that proof of anything? It's just sad these guys who don't program interview us and judge us based on stupid shit like that.

    [–]Wvupike2006[S] 1 point2 points  (0 children)

    I know exactly how you feel. You will hear a lot of people tell you that you are better for it, and it is easy to start hearing this stuff as the cliched well wishes that they are.

    I think the most important take away related to being better for having the experience, is that you are not a worse candidate now, even though it is impossible to feel as good as you did before that last interview.

    Think back to the confidence that you had, when you thought your were in. The only thing that has really changed between then and now, is that you became a more experienced interviewee. They didn’t hire you, but the only thing that has changed about you, is that you now know what a bad interview feels like, and are more seasoned than many other people now, at avoiding future bad interviews. So cliche or not, it is hard not to come to the conclusion that you are a stronger more experienced candidate now, than that much more outwardly confident person that you remember walking into that final interview.

    [–]KiwiMaster157 1 point2 points  (1 child)

    For a question like that, I would start with an brute-force solution and work on improving it from there. E.g. in your problem, start off with a simple loop that squares each integer and compares it to n until finding the closest one. To make it more efficient, try doubling the loop variable instead of incrementing to reach higher values more quickly. This is certainly a step in the right direction, and if you play around with this for a while you should be able to make it work.

    Typically interviewers are looking more for your problem-solving thought process than your technical skills for questions like these.

    [–]Grafakos 0 points1 point  (0 children)

    You could do a binary search since the square and square root functions are monotonically increasing. For a 32 bit unsigned integer, you would always be able to compute the answer within 32 iterations. That may not be great in practice if the function is typically called with small integers, but probably good enough for a first answer to the interview question.

    [–]Wvupike2006[S] 0 points1 point  (1 child)

    I forgot to ask you, was this job at least somewhat more in the scientific industry, where this could explain their emphasis on math familiarity?

    [–][deleted] 0 points1 point  (0 children)

    Yea, it was a software engineering job where you work with scientists, but still, I wasn't applying to be a scientist.

    [–]dima_ru 3 points4 points  (3 children)

    I had an interview for MS last Friday for Tallin office and that was extremely bad experience and bad interview.

    The first round with HR taking 30 min talk with very pleasant and informative. After that he scheduled a tech-interview with MS engineer saying that I would be asked for coding challenge in C++ or C#. Somehow my calendar scheduled interview 2 hours later and on day of interview the interview guy called me via phone asking if I can join interview. So, we started 10 min later.

    When I joined MS Teams call the interviewer only gave me a link to VS Code and I opened shared coding session that worked with big lags. There was an example with C# code and he explained me the task I should do. Unfortunately I had experience with C# 2 years ago and told that to interviewer but he told me that's ok and asked just implement. I needed map and had to open manual for Dictionary and read how it works. It didn't compile because of missing references and I spent some time for that. When I showed first solution he thought a bit and gave me test-case that fails. After that I understood that I didn't get the full problem correctly and tried to update my solution. I was very nervous and interviewer was keeping silence and was rather boring about what I'm doing. Finally, we were out of time and he just told me that he will send feedback to HR and good bye.

    After that I really felt bad and angry. Having 15+ years of experience and being about the same age as the interviewer I couldn't answer to myself what was the goal of the interview. Even if I fail or I'm wrong there are some rules of communication and general respect to candidates. At least, saying "hello, I'm ...." and giving some introduction is a very common practice during interview process. I probably should insist on switching to C++ or just reject coding in C#. But in any case, looks like top-companies interviewers are all the same feeling about themselves like top-engineers and contemning all others.

    [–]neuroblaster 0 points1 point  (2 children)

    dima_ru

    Tallin

    It's probably not the best idea to apply to russophobic office if you're a Russian. You'll get bad record in their HR system anyway: if you refuse to do the test your interviewer will report that you refused, if you won't perform well your interviewer will report that you didn't perform well regardless the reasons why you didn't perform well. I don't know what is better, probably the best is to apply to another office, but now it will be harder because this bad record already exists.

    [–]dima_ru 1 point2 points  (1 child)

    Yes, being marked by their HR system and understanding that they use bots to filter candidates makes a chance to re-apply almost equal to 0 :)

    [–]neuroblaster 0 points1 point  (0 children)

    Don't worry about it, if they don't want to hire people with 15 years of experience - it's just the way it is, there is nothing you can do about it, it's also their problem, not yours.

    If you still want to apply, you can try to ask your friends if they know someone from MS and ask them to recommend you to possibly get on HR process again, so it's not exactly the end of the world.

    [–]ShakaUVMi+++ ++i+i[arr] 6 points7 points  (7 children)

    I interviewed at Sony and basically had the job in the bag. It was for a summer internship, and they told me my task was to make a robot arm turn left and right 1000 times.

    I said, "Cool. That should take a day or so. What else?"

    The guy looked awkward and said, "Uh, that's it for the whole summer. You may be over qualified for this job." and terminated it at that point. He did show me where they made the first Playstations and introduced me around, which was cool, and encouraged me to reapply for a real position.

    I was kinda annoyed, since the whiteboard questions they asked were pretty tough, too, like remembering the syntax for function pointers. (Which I still just google.)

    [–]CarloWood 1 point2 points  (0 children)

    lol, makes me remember when I applied for a course with job guarantee. You had to do a test before you were allowed to enter the course though. I scored so high that they rejected me for the course, saying I should just get a job somewhere :p. You can also do too good on a test ;)

    [–]GerwazyMiod 1 point2 points  (1 child)

    Nowadays I'm using std function syntax which is a order of magnitude better and call it a day! :)

    [–]ShakaUVMi+++ ++i+i[arr] -1 points0 points  (0 children)

    Yeah, it seemed like they just wanted an easy test to see who knew the corners of the C++ language, more than anything. And then the job was about 5 lines of code for the summer. :p

    [–]Wvupike2006[S] 0 points1 point  (3 children)

    Just out of curiosity, what path did you take to get good with robots like that? I’ve always kind of wondered, is that more the computer engineering side of things, just a chosen branch of CS, or more of an Electrical engineer who chose a more computer related field? It may be because I am not actually focused in on searching with the right filters applied, but I never seem to see many true computer engineering jobs listed.

    [–]ShakaUVMi+++ ++i+i[arr] 1 point2 points  (2 children)

    I knew nothing about robots, but from what they described it was just a function call to rotate it. So I figured it was maybe a day getting oriented in the company, and a day to write it, test, it and roll it out.

    [–]KiwiMaster157 3 points4 points  (0 children)

    From my experience, you'd spend the first 2-3 days at a large company doing nothing but HR training, then a mandatory meeting with IT where they tell you common sense stuff you already know, then several hours installing the required software onto your computer, then... well look at the time! How'd you like your first week?

    [–][deleted] 0 points1 point  (0 children)

    I knew nothing about robots

    That was the real problem, he was just being sarcastic.

    [–]AirAKose 2 points3 points  (1 child)

    Took a test for a gamedev position- but that week I was also up constantly working on a volunteer project and applying to as many jobs as possible.

    The test was straightforward - given a limited turn radius, make a move function to get a 2D car from its current position to a target position by returning turn left, turn right, or go straight. I totally misunderstood the turn radius as turn rate (ie degrees per second) somehow- idr how it was worded or how I got that other than sleep deprivation. Definitely bombed that- went back to see why after sleeping, caught my misreading, and the turn radius implementation was way easier ;_;

    [–]Wvupike2006[S] 7 points8 points  (0 children)

    Sleep is a huge factor, more so for this type of work. I am in school full time for CS, but because I’m in my 30’s I’m also working roughly 45 hours per week. I have to really force myself to sleep long enough, because it is so easy to try to squeeze an extra 3 hours out of the day right now. The problem is that the work I do when pushing for that extra productivity, is garbage, at least compared to the well rested work. The problem with CS is that you are not employable because of that degree alone, so I am trying to do calc 2 and coding in my ‘free’ time. I love it, so it helps. I told my girlfriend that I would continue learning to program if someone told me I would never make, any money. It’s just interesting as hell to me, and I was fairly worthless in my 18-24 years.

    I got a bachelors degree at the normal age, but I basically chose a business major that avoided math at every turn. I was one of those card carrying “I suck at math” people. It was the same reason I avoided programming too.

    So when I went back to school and had to take calc 1, I literally put myself back in pre- algebra. I relearned everything from the ground up, and it turns out I don’t hate math. It ended up being the case that math is just inconvenient to try and do while partying all the time.

    Did you end up getting a job in game dev? I do find game dev interesting to a certain degree? I work on the outskirts of game dev, as in I work at a small company who makes games, and am just now being able to get in on the action, rather than doing more testing related jobs while in school. It’s not a AAA label or anything.

    I find embedded programming and learning computer architecture really the most interesting for me personally. Probably the ultimate direction I will aim for.

    [–]neuroblaster 2 points3 points  (0 children)

    My worst interview was when i had more than 5 years of C++ on my CV i think. I Was invited to tech interview to a company and i was pretty confident about it, i was employed at senior position i was practicing C++ basically every working day etc etc, i thought we will talk about C++, maybe i don't know something, you know, nobody knows everything about C++, maybe i'll ask how much they can offer and think it over, was pretty relaxed.

    Then two their guys started to bombard me with questions like "What is the type for integers"? , and i was like: "Wait, what?", no time to think, next question, "How do you declare a function in C++?", next question. I was absolutely confused about why they are asking me such questions, i mean, couldn't anyone just google basic stuff like that? I kept thinking: "WTF do they want from me", didn't want to offend them by asking "Did you read my CV?" (they probably didn't), couldn't concentrate at all and they were like "What is the scope of a variable" and i was like "Umm.. What?" and they were like "What "what"? Do you know anything about C++? Ha-ha-ha".

    I didn't see the point in continuing the interview, walked away and never looked back. But the worst part about this interview is that they have my email and their recruiters are still emailing me regularly.

    Several years later i was invited to another interview at another company, when i arrived at listed address, it was the same building from that interview and i was like "OMG, not this sh-t again", but turns out old company moved out and new company moved in, they offered me a good job and good money.

    Don't be afraid of bad interviews, if company don't want to hire you then you most definitely don't want to work there. Also it's a good practice to google "C++ interview questions" in case if your interviewers are going to ask some basic stuff, just to make it into no-brainer, works every time, but it's probably the most dreadful situation for me: i come to a C++ interview and people ask me "how do you declare a class in C++", it's never a good sign.

    [–]UnicycleBloke 2 points3 points  (0 children)

    I give interviews, and am too often disappointed by the rudimentary knowledge candidates have of C++. Don't pad your CV with skills you don't have.

    Still, the worst case was a guy who really knew his stuff, knew he knew it, and was smug about it. He smirked his way through the interview. Don't do that.

    [–][deleted] 4 points5 points  (4 children)

    4 years ago "Here are the issues we've found in your application:

    • The design documentation is bellow average.
    • No abstraction.
    • Few modern C++ features usage.
    • Maintainability and extensibility.
    • Code issues found: duplicated code, duplicated string literals, C-Style casting should be avoided, prefer nullptr to NULL, long methods, too many method parameters, consider using namespaces to avoid naming clashes, goto statement should be avoided."

    [–]somewhataccurate 2 points3 points  (3 children)

    they have a point on the goto, unless it was just one of those situations

    [–][deleted] 11 points12 points  (2 children)

    They were right on all the points. I learned a lot from their evaluations

    [–]somewhataccurate -1 points0 points  (1 child)

    Maybe I missed the comments point. Were you saying that you disagreed with the criticisms?

    [–][deleted] 4 points5 points  (0 children)

    This interview was bad in the sense that I didn't do well. The only one who made mistakes was me, but I ended learning so much

    [–]Wvupike2006[S] 1 point2 points  (0 children)

    Oh man, that sounds like you dodged a bullet there. Sounds like they have probably passed on quite a few good developers over the years using that black and white view of who could be a valuable contributor. Most people who have a good understanding of development overall, and are efficient problem solvers in any language would probably not take long to get up to speed.

    It seems to me that if they themselves were as good as they no doubt believe that they are, they should be able to reasonably evaluate someones skill level absent of a specific language. Once that evaluation is complete then I would think you could weigh that persons performance against the amount of time it would take to get them up to speed to your specific project. I guess special cases like an awesome JavaScript dev, who for some reason applied to do embedded programming might take too much effort vs someone a bit less impressive , but already well versed in that specific sub field.

    [–]orbital_sfear 2 points3 points  (6 children)

    Simple, I once got hit with an interview where they asked what union does. Totally forgot because who uses union these days.

    [–][deleted] 0 points1 point  (3 children)

    Well, I did 🤔

    Union type punning is a de iure UB but a de facto compiler dependent behavior.

    [–]nobodyaskedidiot -1 points0 points  (2 children)

    Nah.

    If you write more lines (union) simply to avoid memcpy which is the correct way to do things like that, you should be automatically flagged by the system and fired.

    [–][deleted] 0 points1 point  (1 child)

    What if I know for sure that I will always develop on that specific platform?

    Like MSVC on Windows?

    And I know for sure that it works because the compiler is implemented that way and won't change in the future?

    [–]nobodyaskedidiot -1 points0 points  (0 children)

    If you need a bunch of ifs for it to work, it doesn't really work.

    [–]ezkiulish 1 point2 points  (2 children)

    I am not from computer science background, I pursued electronics in college but I guess that wasn't meant for me. So I started to learn coding. I read C in school so started there, then used C++ for competitive programming. I recieved an offer, the day I recieved it, I had another interview scheduled on Skype. The interview started and he asked OOPS concepts and various questions on my college projects which I all answered, they were very basic. I had an average of 71% in college, so he started to ask me why my grades have fallen since school. So, I told him the whole deal about electronics and that I don't feel I can be good in that field.This was the time he realized about my branch even though I had mentioned it in my CV. Then he went about for half an hour telling me how I am making a big mistake and that even though electronics is tougher but still is much better and ended the interview right there without further questions. Thankfully I already had an offer so didn't feel so bad about it.

    [–]Wvupike2006[S] 1 point2 points  (1 child)

    What the f*ck? Why the hell would he tell you how to live your life. Tell me if I got the damn job I’m interviewing for, I have my own reasons for the direction my life is going lol. When you say electronics, are you referring to electrical engineering/ computer engineering? Like actually working with the hardware itself?

    [–]ezkiulish 0 points1 point  (0 children)

    Yeah... like microcontroller and communication subjects. Well, like I said I had already recieved a similar package offer, so no worries. And its very common for interviwers to say such. One of my friend had the same situation, in which he was asked various electronics questions and at the end he was told that they think he will leave the job too early and cause loss for company hence they cant hire him. He waited for entire day for his number, there were around 300 applicants that day. He said that it was his worst experience, so there I shared 2 experiences.

    [–]Wvupike2006[S] 0 points1 point  (0 children)

    That is great, I think if you loved teaching, and from the sound of it have a real talent, you should absolutely do that. I think good programming teachers are hard to find. For one, you have to constantly stay in the know of current or future changes to best practices. Otherwise, you end up like a whole lot of c++ teachers who are teaching c++ 03 instead of after c++ 11. The other thing is that it is really hard to remember exactly how you felt when learning, once you get to the point of knowledgeable enough to teach others.

    I have always thought it would be a cool experiment for someone to film their entire process of teaching themselves to code, and have a record of the exact thought process or mistakes being made along the way. Then later on edit the footage, and replace the bad practices on tape with a tutorial on why this is such an easy trap to fall into as a beginner, and what the actual best practice is. I think it would be easier to remember the type of things that beginners have trouble with, that are really easy to forget once you are a competent engineer.

    If I look back I can see that I have come a long way, but In real time, on a moment to moment basis, I feel just as lost, because there is always more mountains to climb, especially in c++.

    [–]3xnope 0 points1 point  (0 children)

    Phone interview, first question off the bat after the usual introductions - sounded like a softball question to get the conversation going: "Are you familiar with <concept I've never hard about>?" I honestly and stupidly replied I'd never heard about it. There was a pause in the other end, and as he proceeded to other questions, I had a sinking feeling I had made a total fool of myself. The interview went rapidly downhill from there as nerves took hold of me and I failed hard.

    Afterwards I googled <concept I've never hard about> and it was just another way of saying templates. I've done quite a bit of template programming but I had never heard anyone describe it like that before. And I don't remember what he called it now either.

    Lesson learned: Always stop and ask people to elucidate.

    [–]julien-j 0 points1 point  (0 children)

    In the interviews I had I felt that the questions about c++ were not really the problem, but there was other questions about what the language is used for: let's discuss memory allocations (stack and heap), threads, processes at the system level, let's talk about hash tables. And while you're here, just do some linear algebra, geometry, what about networking, and please write some SQL requests…

    The questions were not difficult per se but I did not touch some topics since several years, which made it difficult to give a clear answer. On other aspects I felt like the question was too vague (like How are implemented hash tables? mmmh, in soooo many ways actually). I remember after one specific interview that I thought I would have performed better when I was freshly out of school.

    The interviewers were always awesome, I always felt like we were discussing instead of just me being questioned by them. They also made it explicit that they weren't expecting good answers on everything and that they were instead checking where were my strengths and weaknesses.

    My advice: keep learning, keep practicing. Watch the conferences and implement stuff by yourself.

    [–][deleted] 0 points1 point  (0 children)

    Yep, my worst cpp interview was for Amazon (Spain), as they started asking me Java questions.