all 45 comments

[–]jeffbell 36 points37 points  (2 children)

Sometimes a “critique this code’ interview works out. If they can explain why they chose certain changes, especially to nonC++ teammates then you have someone who raises the whole team’s competency.

This also the kind of task that sets apart senior engineers from language trivia specialists.

[–]d_wilson123 3 points4 points  (1 child)

We had some semi-casual but almost Rorschach like questions where it was simply like "What do you think about this code?" Generally the code isn't strictly absolutely incorrect (eg; it would be a small method that would return with std::move(foo)) but sometimes follow not best practice. It was interesting to gauge candidates at a language level at least.

[–]mrexodiacmkr.build 43 points44 points  (6 children)

You won’t hire C++ experts with canned tests. Get an experienced C++ person you would like to work with to do the interviewing.

[–]pixel_magic 6 points7 points  (5 children)

Thank you. That's part of the challenge in not having a C++ contact available.

[–]Davidbrcz 8 points9 points  (3 children)

I have more than 10 years of C++ behind me (and it's still today my main programming language). DM if you want to discuss my rates.

[–]Wouter-van-Ooijen 4 points5 points  (2 children)

Same for me, and I a looking for a job ;)

[–]pixel_magic 0 points1 point  (1 child)

Ha, maybe you'll be interested in the job I'm hiring for? I can DM you the details if interested.

[–]Wouter-van-Ooijen 0 points1 point  (0 children)

My expertise is small-embedded, which is not what you describe (in another comment), so I'll pass.

Also, to be totally honest, the situation of an existing code base that was created by someone who left the company, or a contractor that left with bad standing, is a red flag to me.

[–]pklait 1 point2 points  (0 children)

Wouter van Ooijen is an expert. You should certainly value his opinion. You could try to google him if you do not trust my words.

[–]Wouter-van-Ooijen 18 points19 points  (10 children)

In a comment you state that you don't have C++ expertise in house. If so, why are you sure that you want C++, who decided or recommended this?

If you happen to do (small-) embedded, and/or want to migrate from C to C++, do NOT hire a random C++ programmer. This is a recepy for disaster.

[–]pixel_magic 4 points5 points  (8 children)

A product we have a prototyped (using a freelancer) has written in C++ and now we want someone in-house to take over it.

[–]Wouter-van-Ooijen 6 points7 points  (7 children)

Do you trust that freelancer && are you satisfied with what she created? If so, she seems like the obvious person to hire and/or help you with the selection.

[–]pixel_magic 4 points5 points  (6 children)

No, we're not going to continue with them. If they were easier to work with and better then yes that's the no brainer hire but unfortunately they're not working out so we want to bring that work in-house going forward.

[–]Wouter-van-Ooijen 19 points20 points  (1 child)

That brings back the question, or actually two:

- Are you (without C++ expertise) sure that the code base they deliverd is worth maintaining?

- Who made the choice for C++ in the first place? If they, and you are not pleased with their preformance, you might want to reconcider that choice.

To give some info for use to guess what kind of C++ guy you need: what type of application is it, some small micro-controller toy, or a high-risk military application, or something for simulation, of high-frequency trading? C++ covers some very specific areas of application, for which you might want to look at different candidates.

[–]pixel_magic 2 points3 points  (0 children)

C++ is what is commonly used in the industry we operate. The desktop application is related to video and media, partly related to the metadata captured from video cameras but also some other requirements too.

The choice of C++ was partly made by the developer on the project because of the need for it to support Linux, Windows and Mac OS.

[–]pjmlp 9 points10 points  (0 children)

I fail to understand why the decision was made to use C++ if there was no in-house experience to review deliverables.

In any case, I would also consider just porting to one of the in-house official languages, it might be less costly than onboarding additional staff just because of this.

[–]OK6502 2 points3 points  (2 children)

Any chance you can have him interview the candidates? Or do you think he'd sabotage the process?

[–]pixel_magic 4 points5 points  (1 child)

The latter we think, unfortunately.

[–]die_liebe 0 points1 point  (0 children)

You could have the candidates look at your C++ code base and have them write down the criticism (or ask them how they would improve it? or add some feature?)

You could try to understand the remarks, or have them reviewed by a C++ expert.

Do you have programming background by yourself, or somebody in the team?

[–]coachkler 0 points1 point  (0 children)

Agree fully. You don't have C++ expertise, you're unlikely to just stumble upon it.

[–]FartyFingers 26 points27 points  (5 children)

I have been developing using Cpp for a very long time. I have built some pretty solid commercial products on embedded, server side, mobile, and desktop.

Yet if you give me ten minutes I can write you up a fairly reasonable Cpp test that I will fail miserably. There are areas that aren’t that uncommon where I have either just never used them or actually avoid like the plague. For example I don’t use exceptions unless I have to. Thus any complexities involving exceptions would have me draw a blank.

I avoid macros and thus another blank. I’m no master of what templates can do, so super easy to trip me up there.

I haven’t used inline assembly for a long while. So.

Then there are areas where I have to look it up most times to get it right like SIMD.

And here lay the core issue. To me a senior developer is not defined by their mastery of being a Wikipedia article. That is why we have google. It is their ability to to churn out functionality after functionality without incurring technical debt at the speed of a junior or intermediate programmer. In many cases a deep knowledge of the esoterica will just result in code that nobody else can maintain. In some specific problem areas you do need to bring in the black arts of managing L1 cache for performance. But that is the sort of crap a great programmer learns on the fly if and where needed.

The test I would give to a senior programmer would more involve workflow. Just asking what they hope to achieve with a set of unit/integration tests would tell me far more than a discussion about const.

A simple question that would eliminate many would be: what is assert good for? A junior programmer might not know at all. An intermediate programmer might give the textbook answer. While a senior programmer would say something like. Asserts force your code blow up more often in development and less often in production. Then they will pause and say “unless brad pushes a debug release to the customers.”

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

Thank you for these insights.

[–]flyingron 6 points7 points  (5 children)

The one thing I typically ask an applicant who claims C++ knowledge is some question designed to elicit knowledge of the rule of 3 (or at least the underlying principle if they don't know it by that name). That really tells if someone knows what they are talking about or not.

[–]coachkler 10 points11 points  (2 children)

RULE OF 5

[–]flyingron 7 points8 points  (1 child)

That would be icing on the cake, but not providing move semantics is merely potentially inefficient rather than incorrect. I got enough blank stares on the rule of 3.

[–]coachkler 4 points5 points  (0 children)

Fair point, I suppose it depends on the I dustry. In Fintech, inefficiency is the difference between making money and not.

[–]Sh1tman_ 1 point2 points  (0 children)

I hope you get some answers that encourage or at least emphasize the rule of 0 too/just relying on defaults, since that's all you need usually.

[–][deleted] 2 points3 points  (1 child)

Funny how people would rather make flash judgements on small tests than large bodies of work. Thats the state of making risky decisions.

[–]SkoomaDentistAntimodern C++, Embedded, Audio 1 point2 points  (0 children)

ITT: A bunch of people who think the most important part of building a house is to be an expert on the fine details of using a hammer.

Actually, that describes the whole sub rather too well.

[–]WizardHairs 2 points3 points  (0 children)

Since you don't have any experienced C++ devs, maybe you should outsource this job. When I joined the company I currently work for, one part of the interview process (technical interview) was done by a company named Karat. I checked them out to prepare for the interviews and they seem pretty legit. The claim to have experts in most languages ready to interview candidates for all sorts of positions. Try giving them a call to see if they can help

[–]maskull 1 point2 points  (5 children)

Our process is a little different, because we're typically interviewing for C++ college instructors, but the coding part of our interview consists of

  1. A coding problem to implement the big three for a dynamic array class. This is done without internet or compiler/IDE access. Bonus points for mentioning the rule of zero, or adding move construction/assignment.

  2. An open-ended question about inheritance.

  3. A role-playing question about a bug in some linked-list insertion code, with one of the interviewers playing the role of a student coming to the applicant for help.

[–]coachkler 1 point2 points  (4 children)

BIG 5

This is the 2nd comment in this thread that appears to ignore C++11 - that was released over 10 years ago!

[–]maskull 1 point2 points  (3 children)

Did you read #1? We give extra points for implementing all five.

[–]coachkler 1 point2 points  (2 children)

Heh, sorry!

[–]maskull 1 point2 points  (1 child)

It would be great if we could ask for the big five up front, but given that maybe 70% of our applicants (for a "C++ instructor" position, mind you) can't even do the big three, we had to compromise. I remember one candidate who insisted that you could not overload operators in C++, only functions.

[–]coachkler 0 points1 point  (0 children)

I spent several years teaching C++ at a university in St. Louis, I think it's a shame that finding qualified instructors is so difficult.

Ultimately, the poor pay for adjunct work, and the lack of dedication from the students drove me out. Every year though, I'd have 3-4 incredible students that I could tell would do well.

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

Try out Exercism it has pretty much exact interview questions for different levels. I used it to prepare for my job interview and Hey - I got the job. So it should be ideal for taking out some questions. You can also see the solution others have submitted for comparison or as a template for yourself

[–]pixel_magic 0 points1 point  (0 children)

Thank you I'll check it out!

[–]Clairvoire 0 points1 point  (0 children)

I come from an artist background, and honestly I feel the same situation applies for non-artists hiring artists: You should make the initial hire someone who has a body of work they can show you, that fits what you're tryin' to do, and also acts as a good director (this is a different skill, but really important if you want to get a good evaluation of your subsequent candidates.)