Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
interview questions
8 Posts
interview questions

our ROR project is growing fast. my boss has decided to advertise on workingwithrails because of its reach but has asked me to filter the applicants and do the first interview. ive not hired people before and im not sure what technical rails questions to ask. does anyone have any stock questions?

It is very simple. Ask them to name a patch they have contributed and show you the link. Then ask them to name 3-4 blogs they follow in the ecosystem. Then finally ask them to show you how to use mixins properly and what is metaprogramming good for. If they fail at any of those they are not a rockstar.

If they aren't involved in the community they are already outdated, if they don't understand metaprogramming and mixins their code will suck and have to be rewritten. You might also want to ask them how they would scale an app.

All of these questions can be pulled together by reading RoR blogs.

Person
Sr. Ruby & Rails Consultant For Hire
Sign In To Rate Post

Yes, but not every position requires a rockstar. As far as I can tell, it is perfectly possible to be an excellent Rails developer without patching the core or following blogs. It is also possible to follow blogs, have an amazing knowledge of the core, and yet not be a particularly good application developer.

Some good points raised here. I agree that Axel would weed out the community-rockstars, but also that that may not be what you need. To be honest, I've not patched the core at any point... but I've been working solidly on commercial rails sites for the past (neary three) years. So it depends on what sort of experience you're after.

Some ideas: * Get them to explain MVC in Rails - and a few examples of what goes where eg: "On the 'my orders' page, an order should only display the edit button if it hasn't been finalised - what methods do you need and where do you put them?" * Get them to explain the Rails process - ie how we go from "user clicks on URL" to "page is rendered to browser" ie you're looking for how the URL is parsed/routing, to calling a controller+action, to pulling out data for the views to picking appropriate templates and filling in the data. * Get them to write something that requires blocks and yielding (some examples in the ruby book), or monkey-patching a class. eg: "I have an integer that represents a number of hours. I want to be able to do an 'in_seconds' and an 'in_minutes' method on it. Where would I put this and how would I do it?" * Have they written a plugin? Have they published it? It is popular (usage stats)?

Simon,

Don't forget to ask them open ended questions about things like their problem solving abilities! I can't stress this enough!

Asking your candidates more than just technical questions with yes/no/multiplechoice/technicalsyntax styles of answers is so incredibly important. You want to see how they solve problems, how they interact with others, and how they are capable of working independently (not just as a team!) If you ask open ended questions, you can very quickly identify whether or not the candidate is able to learn new technologies, solve problems quickly and efficiently (rather than spend 8 days searching Google, too proud to ask another team member if they've solved it before), and most importantly deliver!

Anyone can learn syntax, or commonly refer to solutions made by people in the community, or quote buzzwords. But as James O'Kelly said, if they don't truly understand more advanced concepts like metaprogramming and mixins, they'll have the potential to blow smoke your way!

-Kevin Elliott "WeLikeFood Beta":http://www.welikefood.com Discover great restaurants. Discover great food enthusiasts with your taste.

there are at this point a few good resources for this:

http://blog.ritirisi.com/2008/06/17/15-questions-to-ask-during-a-ruby-interview/

http://www.joesniff.co.uk/ruby/rubyrails-interview-questions.html

a few others i like: * what do you not like about ruby on rails? identify its weak points. the answers i expect here are fixtures, routes, scalability. a good followup on scalability is: how have you in the past dealt with the scalability problems, and what does your preferred deployment environment look like? bonus points for identifying the weakness in using multiple databases. * what is the difference between a symbol and a string? when should they be used? * when would you use request.xhr? * when would you use has_many :through? * when would you use a polymorphic association? is there a better method? (has_many_polymorphs) * when is it appropriate to use a helper method? where should that helper method live? * explain the use of modules in controllers, and give an example? * when should namespaced controllers be used? describe the effect this has on routes.rb. * when would you use multiple databases in a single rails app? explain. * when is it appropriate to use the following to modify data in the application? rake task, console, db client such as mysql? * how many ways are there to generate path information for a helper, such as 'link_to'? the answers I look for are url_for(hash), hash, named_route, string. * where might you find information such as HTTP_REFERER and HTTP_ACCEPT_ENCODING? (request.env) * what plugins do you use most? * what are the pros and cons of using config.gem in environment.rb? when is this easy/difficult? * give an example of using metaprogramming in a view or partial?
* when is STI an appropriate solution to a problem?

just a few thoughts. some of these are inobvious, and they are clearly meant to test the breadth of a developer's knowledge. if you need answers to these, let me know.

One of my favorite questions is to ask is, "What's wrong with Rails and how would you fix it?" This is very similar to the "show me a patch" approach, but more workable in an interview environment. I've sent in patches to Rails, most of which have been accepted, but I doubt I could point you to the commit that introduces them without some serious hunting. And most of those patches are short enough that I don't think they accurately reflect my skill as a programmer. I'd much rather look at a library written by a candidate or even just a complete component of some project. It's a lot easier to provide the URIs for those than the contents of a patch you might have written some time ago.

If you need something more like an email question the candidate can't use google the answer for (unlike FizzBuzz), try something like:

Given the following lines of code, create a Hash object that maps the keys to the corresponding values and assign it to the "hash" variable. For extra credit, do this in one line, less than 80 characters, without using single-character parameter names.

keys = [:one, :two, :three, :four]
values = [1, 2, 3, 4]
hash = ?

There are quite a few "right" answers.

Here's mine (which should probably no longer be accepted as a valid answer):

hash = keys.zip(values).inject({}) { |accu, pair| accu.store(*pair); accu }

I wouldn't ever reject a candidate for missing the "extra credit" here but they should certainly be able to do it in long-form.

Dear all of you.

I am Anna Ngo, content coordinator of hrvinet.com. My digg at: http://digg.com/users/cangvina

I am do a project of interview questions and I hope that it is useful for community.

I would like to be received kindly comments from all of you.

[B]Interview questions include:[/B]

[B]1. Phone interview questions[/B]

[B]2. Situational interview questions[/B]

[B]3. Behavioral interview questions[/B]

3.1. Interview questions of knowledge and education

• It include 15 interview questions about knowledge and education. • Please visit at questions of knowledge

3.2. Interview questions of working experiences

• It include 30 interview questions about experience. • Please visit at interview questions of experience

3.3. Interview questions of soft skills

• Negotiation skill • Time management • Analytical skill • Interpersonal skill • Decision making • Problem solving • Persuasion skills • Communication skills

3.4. Interview questions of management and leadership skills

• Conflict resolution • Motivation skill • Goal Setting • Change management • Strategic planning • Coaching skill • Leadership skill • Management skills • Manager interview questions • Planning skills • Organizing skills • Controlling skills • Delegation skills • Executive interview questions

3.5. Interview questions of abilities and personalities

• Employee ambition • Initiative / creativity ability • Team work • Pressure ability

[B]4. Stress interview questions[/B]

[B]5. Tough / difficult Interview questions[/B]

It include 51 Tough / difficult interview questions about last job, competencies, new job etc

[B]6. Interview questions from companies[/B]

• Microsoft interview questions • Google interview questions

[B]7. Common interview questions[/B]

It include questions as follows:

• 60 common interview questions • 36 good interview questions • Illegal interview questions • Top interview questions

[B]8. Interview questions by departments[/B]

• HR interview questions • Secretary interview questions • Administrative assistant interview questions • Sales interview questions • Marketing interview questions • Accounting interview questions • Finance interview questions • CEO interview questions • Production interview questions • Quality interview questions • Project interview questions

Source: http://www.humanresources.hrvinet.com/sample-interview-questions/

Best regards Anna Ngo

8 Posts
Login to add your message