views:

319

answers:

5

Hi there, I'm trying round up some materials to be used during interviewing. I have different levels of jobs (junior, senior) that I am trying to fill.

One thing I would like to assess is a candidate's ability to write "Clean Code", things like:

  1. Do they normally think along the lines of DRY, YAGNI
  2. Are they familiar with Pattern concepts, things like the Law of Demeter?
  3. Are they a pragmatic programmer?

Naturally I can sit and ask questions around these topics, but I wonder if there is a way to test a candidate for these? Anyone tried putting something together who would be willing to share their work?

Thanks Rob

+2  A: 
  1. FizzBuzz

Beyond that I'd ask them what online resources they use on a daily basis. What blogs do they read, etc.

You could always ask them to create a pretty trivial application by using Test Driven Development.

Beyond that, I'd ask for code samples.

Terry Donaghe
+1 because in my last interview, I was asked to write it.
Martin
A: 

If you are interviewing for a web development position ask them how a normal HTML form works. Basic GET, POST then using AJAX etc. Without frameworks. This is fundamental to building websites but .NET tries hard to isolate developers from it.

As a front end developer myself, I find those who have the the curiosity to understand this stuff are much better to work with.

edeverett
+2  A: 

IMHO, It's very difficult to assess, in an interview setting, whether a candidate can write 'Clean Code';. I haven't had much success in this area so far.

There are two things which I am thinking about which could potentially work.

  1. See if candidate can bring code samples. This is obviously complicated because a candidate can not bring their code which they wrote for their current/past employer. So a candidate has to bring code which they wrote in their spare time. If candidate does bring such code, it means that they are genuinely interested in programming + you will have chance to evaluate their coding ability.

  2. Create some example code yourself which doesn't follow DRY and YAGNI principles. Ensure that the sample code has some glaring logic holes as well as some subtle bugs. The sample code should not be 100% object oriented as well. Also prepare what you think is the 'Clean' version of this code.

Discuss this imperfect code with the candidate and see how they would fix it. See if they are able to find all the glaring holes (It's a big warning sign if they can't find obvious bugs). See if they reach the same level of 'cleanliness' as you prepared. You will learn a LOT about the candidate based on how they approach this code review/refactoring.

  1. If they participate in community like StackOverflow, check out their questions and answers. I think that could be another valuable input in deciding candidate's ability. :)
SolutionYogi
Thanks kind SolutionYogi! #2 sounds appealing! I'm going to try that route.
RobDemo
You are welcome rcecil. One last suggestion: Be 100% sure about the candidate before you hire them. I completely agree with Joel that if you have even a little bit doubt, turn the candidate down. Good luck.
SolutionYogi
Please add an extra "s" to the word "asses" in your first sentence up there. I think you mean "assess." :D Made me chuckle.
Terry Donaghe
Thanks Terry, corrected the post.
SolutionYogi
+2  A: 

I like vague, open ended questions. They let the person I'm interviewing do most of the talking and I've found I get a pretty good idea of how deep their knowledge goes. Some of the types of questions I've asked are:

  1. You're designing an ASP.NET web site. How would you implement site-wide error handling?
  2. What's the difference between implementing an interface and inheritance? When would you use each?
  3. Design a database that tracks students and the classes they are in. Once that part is done, ask about keeping grade information.

These types of questions have helped me try and determine how the developer approaches and breaks down problems/challenges. I avoid asking syntax questions though I do ask language specific questions around things like error handling, object concepts in the language, etc.

I've found the database one works wonders. The question is very simple on purpose. In the vast majority of cases, if the interviewee needed a white-board or paper, they were going to struggle with the answer and typically had poor database design skills.

I also dig deeper with the developer and these type of open-ended questions lead me into different directions and discussions.

Jeff Siver
A: 

I will also ask:-

  • If they read any technical books
  • What they do in their free time
  • Latest new technology they learned
  • If they follow any blogs / forums

Answers to questions like these will give you some idea about how passionate the candidate is about programming.

MOZILLA