Rust interview questions?

It is interesting to me, if anyone here hires people for coding in Rust language, what are the interview questions do they ask? Or what would you ask and why?

4 Likes
  • How did you hear about Rust?
  • Why did you choose to program in it?
  • Any previous experience with
    • model driven development or Model checking?
    • functional programming?
    • embedded?
    • C/C++ or other real time capable language?
  • Projects worked on? Any open source?
    • team size?
  • University students: which lectures taken?
  • Version control and Continuous Integration experience?
5 Likes

Read this Article It will definitely help you Rust Programming Interview Questions

2 Likes

I haven't done any Rust interviews, but from learning rust I would say there is some low hanging fruit as to what are challenging topics:

  • intricacies of the Pin api, like "This code has a pin projected field and it has a getter to it which returns a &mut to that field, is that ok, why (not)?" <= if you are hiring for an async networking position.
  • explain unwind safety
  • variance
  • all the stuff that can go wrong in unsafe code
  • maybe a bit easier, but ask to explain the reasoning behind object safety or orphan rules, like "Why did they decide that a trait with generic methods is not OS?"

I've been writing Rust ~daily since 2014 and have pretty intensely followed its development since then. I would easily fail this interview.

17 Likes

:smiley: Well, as I said, I have no experience with interviews, but I would think its not something like:
"You didn't get everything exactly right so you failed",

but more a gauge of
"This person claims to be a rust expert, can they actually explain the concepts?", which would leave a big spectrum between "They have no clue", "They somewhat understand it but might not be an expert in the details" to "Wow this person nailed all of it".

and maybe something in the lines of:
"If this person is to write correct and safe code, am I going to pay them 3/4 of their time to learn rust or 3/4 to write rust because they did the research before I employ them."

I found this a nice read, not rust related:

I'm not judging myself against perfection. I would provide some pretty insufficient answers to your questions. I might have a few good general ideas, but if asked about these things on the spot, I would provide answers the range from "I don't know" to "hand wavy."

It is difficult to ask good interview questions and very easy to ask questions that are too hard to answer. I'm trying to provide you with a data point from someone who has a public track record of Rust experience.

3 Likes

I never understood the idea about asking all kind of trivia questions about whatever programming language the job entails.

In my career I have been hired, often as a freelancer, to work on projects where I knew nothing of their language or OS or whatever at interview time. For many years it seemed every project required learning yet another language.

At interview we would get into discussions about what I had been doing, what I wanted to do and what their project was about. I would be straight up honest about my lack of knowledge of implementation details like the programming language. It seemed to be always assumed one would pick that up, after all, pretty much any project has a lot more complexity in understanding it's problem domain than it's implementation language.

Assuming I had an experienced programmer in front of me, from whatever language background, I would look to evaluating their motivation and enthusiasm for getting into Rust, do they get the idea or is it just another job for them.

3 Likes

Most of these questions are random trivia. I wouldn't ask about that kind of thing unless the interviewee suggested they know about it. I would probably go for a simple question about some problem with an obvious O(n^2) solution along with a rather simple O(n) or O(n log n) solution using e.g. a hash map.

3 Likes

I found this list of purported Rust programming interview questions to be almost pointless. Paraphrasing from the link in @najamelan's post above

5 Likes

thanks for sharing

Somewhere along the line you need to evaluate more than trivial factual knowledge:

Does this person have a brain and an aptitude to do what we want?
Do they have the motivation, the enthusiasm, the passion for the work and the project?
Will they fit in with the rest of the project team?
Are they a good investment?

It used to be often said that one should judge a candidate by the questions they ask, not the answers they give.

Of course if you only want someone to drop in for a month or two and make something fly that might require more specific knowledge. But how many ready made Rust experts are there out there to be found?