Ayende @ Rahien

My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:


+972 52-548-6969

, @ Q c

Posts: 6,131 | Comments: 45,565

filter by tags archive

Stories from the interview room, part II

time to read 3 min | 413 words

So, I just finished interviewing a candidate. His CV states that he has been working professionally for about 6 years or so. The initial interview was pretty well, and the candidate was able to talk well about his past experience. I tend to do a generic “who are you?” section, then give them a couple of questions to solve in front of Visual Studio, an architecture question and then a set of technical questions that test how much the candidate knows.

Mostly, I am looking to get an impression about the candidate, since that is all I usually have a chance to do in the span of the interview. The following is a section from the code exercise that this candidate has completed:

for (int i = 0; i < sortedArrLst.Count; i++)
    if (sortedArrLst[i].Contains(escapeSrt[0]))
        if (sortedArrLst[i].IndexOf(escapeSrt[0]) == 0)
            sortedArrLst[i] = sortedArrLst[i].Remove(0, escapeSrt[0].Length+1);
            escapeStrDic.Add(sortedArrLst[i], escapeSrt[0]);
    if (sortedArrLst[i].Contains(escapeSrt[1]))
        if (sortedArrLst[i].IndexOf(escapeSrt[1]) == 0)
            sortedArrLst[i] = sortedArrLst[i].Remove(0, escapeSrt[1].Length+1);
            escapeStrDic.Add(sortedArrLst[i], escapeSrt[1]);

Thank you, failure to use loops will get your disqualified from working at us.

Then there were the gems such as “mutex is a kind of state machine” and “binary search trees are about recursion” or the “I’ll use perfmon to solve a high CPU usage problem in production”.

Then again, the next candidate after that was quite good. Only 4 – 6 to go now.


Rob Conery

I trained a real estate appraiser how to edit videos. His favorites? Yours. He made the compilation for our Mystery Code Theater. He's amazing and knew shite 0 nil about video editing.

Your evaluation process is filtering the Brilliant Mind.

Ayende Rahien

Rob, Can you translate this so I'll be able to follow?

Steve Conlan

@Ayende What can't you follow about @Rob's post? What can't you translate?

I'll explain for you, Rob is suggesting that a mind capable of learning and getting things done is being filtered out of your process.

Rob Conery

Sure :). Editor Scotty (the guy that does the rough edits on our vids - including yours) was a real estate appraiser and (is) a very smart, capable person. He didn't know how to use video editing software so I showed him - as well as the things I look for in terms of story line and so on.

Not only did he learn how to effectively "rough edit" - he also learned how to fast-cut and squeeze a story out of long-running video clips. This kind of thing is utterly priceless to me.

He got it because he's bright and motivated and understands what I want him to do.

My point: you're ignoring so much by staring at a simple data point: "does this person know for loops?". I understand that you expect your hire to know to use them, but that's a 10 second conversation to someone who might not know at this very moment.

Subject matter (in my experience) matters very little. Desire, excitement, personal skills and a willingness to learn and help - way way way more important. To me, these are criteria number 1.

Ayende Rahien


The major difference is that this someone came with 7 years of working with code. By this time, if he didn't get the hang of using loops, he probably won't be.


Sorry Rob but I'm with with Ayende on this one. Way too many "smells" with that candidate's answers; the risk of a bad hire is too high to consider him further.

Justin Nel


Have you thought that perhaps he was never told he was doing it wrong, so never had a reason to question his methods, and as such never improved. From personal experience, once upon a time I thought I knew threading simply because I knew how to create a thread and make use of delegates. A couple years later I discovered how wrong I was and quite quickly started to improve on what I knew about threading as to write better code going forward (and improve things I had written in the past).

Justin Nel

Really need the ability to edit comments on here... My apologies for the typo with your name!

Jef Claes

But the tests pass right?!


What exactly are the loops problems in the candidate code?


Interesting. maybe working under pressure is not his best.:)

Ayende, did you ask him to refactor his code? because everybody does it , the refactor thing.


The current loop contains the same code twice. The only difference is that he's first checking the first item, then the second. He should have looped over escapeSrt at least.

Kelly Sommers

As an employer, I don't think posts like this are a professional way to behave. Although they are anonymous, there is a human trying to make a living being humiliated here and I can only imagine how they might feel after having a bad interview only to then read it up on the internet in the public eye.

Posts like this series make me uncomfortable because I've been that nervous person interviewing for a job. I've said some pretty ridiculous stuff during these moments.

Attracting good talent is like marketing. Blog posts like this don't help project a friendly work environment, even if its the furthest from the truth. I don't think I would interview with any workplace that humiliates candidates this way.

If you're trying to attract good talent, this isn't helping.


Ouch! That is scary code. I am worried for that guy.

Daniel Lidström

He's modifying the string he's iterating. I'd say that is a no-no.

Patrick Smacchia

I am with Kelly here, "there is a human trying to make a living being humiliated here and I can only imagine how they might feel after having a bad interview only to then read it up on the internet in the public eye."

You'd better mention only positive things that happen in the interview room, such positive things that made your mind to actually hire the guy.


Oren's interview rant posts are not western-PC, and nor are his code reviews. It has already been pointed out that in some cultures there are different ideas on what is PC, and the interviewees, coming from the same background, are probably not as broken up about his outspoken opinion as you think they should be. Also Oren is a bit of a dafka-nik, so complaining will probably not help. I actually like these entries every now and then.

Eric Smith

I agree with Kelly as well. I really don't see the point of these posts other than to humiliate the person that was interviewed. What purpose do they serve?


I'd chalk up the issues with that code due to nervousness/pressure... but not after seeing the way they described binary trees and mutexes... also, I'm curious, Ayende, what would you consider a good answer for high CPU issues in production? Analyzing dump files?


Another thing - I LOVE the fact that you let interviewees use Google search when writing code. That is something I will push to adopt at my company. I think that's a fantastic way to simulate their real world abilities.


Perfmon is a perfectly legitimate tool for analyzing high CPU usage. There are all sorts of things you can use it for to help narrow down where your CPU usage is coming from. Occasionally this is even enough to make the root cause obvious. In other cases, it often can help you find a good starting point.

Ayende Rahien

Justin, I am assuming that "you can use a loop for that" is basic enough that it came up before. Again, we are talking about someone with 7 years of coding experience.

Ayende Rahien

Dan, High CPU? Look using something like Sys Internals tools to look at the threads of the running system, to see stacks. Taking mini dumps and analyzing it.

Justin Nel

Ayende, I fully agree with you in this instance. I am just hoping that you do not use this mindset as a blanket across all bad code. At the end of the day, we've all made mistakes, and unless we have a reason to question what we know (such as criticism, comments, etc from our peers), then we will not learn and will simply continue to repeat our mistakes.


Why is everybody so politically correct? Is this code BS or not?



At my previous job, the CIO wanted to hire a ".NET Enterprise Architect". So he brought forth a previous employee, from his last company, who claimed such a title, with 10 years of experience.

(First warning sign: CSLA was plastered all over his resume).

When he came in, I handed him our Junior .NET Developer quiz (ten questions of really basic crap).

One of the questions was: "How would you convert this comma delimited string into a string array?" (it also included a code sample of the string value to use)

His answer (after almost 2 hours): "I'll get back to you." (literally written as the answer)

That night, he got home and emailed me about String.Split.

We didn't hire him.


I can understand Oren's frustrations.


I see being politically incorrect as saying "this person is a bad coder because they are... choose gender/race/sexual orientation/..".

Saying they're a bad coder because they write crap code is being honest and professional (although a little blunt).

Having seen several recent samples myself of code from prospective employees, who, despite having multiple years C# experience, are completely unable to write and use a class with 2 properties (string and int) and 2 methods (to increment the int and reset it to zero).

So "Ten years experience or one years experience ten times"?

Judah Gabriel Himango

Seeing all these comments sympathizing with the interviewee, I wrote up a blog post on all this:

Charlatan developers and the blunt truth http://debuggerdotbreak.wordpress.com/2013/07/29/charlatan-developers-and-the-blunt-truth/


Not looping escapeSrt[] is bad and an immediately obvious oversight, but what about (assuming the logic is correct) the possible double exhaustive search of sortedArrLst[i] via Contains() and IndexOf() if you're only ever going to remove it when the string StartsWith() escapeSrt[j]?

Tom Janssens

Join the club! I once interviewed a guy who had 4 years of experience with Oracle, however he did not seem to know what a GROUP BY was.

Brian Brashear

It's all about the approach Ayende chose to take. He could have taken the individual to the side and used the opportunity to mentor, but instead, Ayende has chosen to take the cheap, unprofessional route for a quick laugh at the interviewee's expense. Yes, the interviewee should have been informed, but not via a blog entry having the sole purpose of embarrassment. I really don't even take issue with exposing this via a blog entry had Ayende acted more as a teacher, using the opportunity to show what he felt was the correct answer and explaining why he felt so. But Ayende's criticism was not constructive... it was 100% destructive and honestly it is that type of attitude that I would avoid hiring at my company. If we are truly being critical for the sake of comedy, why not point out Ayende's numerous grammatical mistakes in this article and many others. We can all laugh at his misspellings and other mistakes, right? No, because I'd like to think we're better than this, though, I have a feeling I'll be proven wrong.

Judah Gabriel Himango

Mentor? He's interviewing people for a job, not grooming protégé.

Daniel Marbach

You should look for engineers which are not good in programming but have strong social skills. This would certainly help HibernatingRhinos to build up some karma. Technical skills alone are not useful. With that People might get less answers like:

What has been done in terms of performance for RavenDB?


I think there is a problem with RavenDB Performance... Could that be?

No! Provide failing test!

Just my two cents


What's exactly the problem in this code (with loops)? I see useless if Contains and could also probably write this with LINQ but other then that?


And it also checks each line twice, doesn't foreach on escapeSrt. But we don't know what he was to write.


What is wrong with this code? Or what should it do? Without knowing what it should do we can't point errors. Ok there are useless checks but can you explain what you had in mind talking about loops? I'm bad at spotting things without running them. So I copied it into VS. Compiles, works. Printed out both list and dictionary. But I don't know what this code should do.

Ayende Rahien

Johny, If you don't see the problem, I really can't help you


Ok, I suck. I get it. But can someone tell me what is wrong with this code?

  1. Code duplication (could be extracted to method)
  2. Removing escape string removes it and one additional character
  3. If there are two input strings one starting with first escape string and another starting with second escape string and then they have same rest of the string adding it to dictionary will throw - input: "acde", "bcde", escapeStrings: "a", "b"
  4. Not iterating over escapeSrt (but we don't know if he wasn't said there will ever be only two elements in escapeSrt)
  5. If he's logic is right he could also join escape strings and do one check if StartsWith(joinedEscapedStrings).

What have I missed. Only point 4 touches loops. And as I said we don't know what info he got on table containing escape strings.


Saying this gut can't use loops is really stupid. What is for? Isn't a loop? First you should tell readers what he was up to implement. Without that we can't judge him. I wonder how all the people can laugh at him? This code could have many bugs or not, be written how he was said to write it or not but we don't know that without knowing he's task!

Comment preview

Comments have been closed on this topic.


  1. RavenDB Conference 2016–Slides - 15 hours from now
  2. Proposed solution to the low level interview question - about one day from now

There are posts all the way to Jun 02, 2016


  1. The design of RavenDB 4.0 (14):
    26 May 2016 - The client side
  2. RavenDB 3.5 whirl wind tour (14):
    25 May 2016 - Got anything to declare, ya smuggler?
  3. Tasks for the new comer (2):
    15 Apr 2016 - Quartz.NET with RavenDB
  4. Code through the looking glass (5):
    18 Mar 2016 - And a linear search to rule them
  5. Find the bug (8):
    29 Feb 2016 - When you can't rely on your own identity
View all series



Main feed Feed Stats
Comments feed   Comments Feed Stats